Convert colors to unsigned int before converting them to string
This commit is contained in:
parent
5f8dd2756d
commit
bf9035bb2c
@ -59,14 +59,14 @@ data class ColorRef(
|
||||
val tone: Int,
|
||||
) : Color {
|
||||
override fun toString(): String {
|
||||
return "\$${color.toString()}.$tone"
|
||||
return "\$$color.$tone"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class StaticColor(val color: Int) : Color {
|
||||
override fun toString(): String {
|
||||
return "#${color.toString(16).padStart(6, '0')}"
|
||||
return "#${color.toUInt().toString(16).padStart(8, '0')}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user