net.nemerosa.ontrack.model.labels.Label.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.labels
import net.nemerosa.ontrack.common.toRGBColor
open class Label(
val id: Int,
val category: String?,
val name: String,
val description: String?,
val color: String,
val computedBy: LabelProviderDescription?
) {
/**
* Foreground colour
*/
val foregroundColor: String get() = color.toRGBColor().toBlackOrWhite().toString()
/**
* Representation
*/
fun getDisplay() = if (category != null) {
"$category:$name"
} else {
name
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy