net.nemerosa.ontrack.model.labels.Label.kt Maven / Gradle / Ivy
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