KColor¶
@Serializable
data class KColor(
val red: Int = 0,
val green: Int = 0,
val blue: Int = 0,
val alpha: Int = 255
)
A serializable, immutable ARGB colour value for use in GUI composables.
KColor is a pure-Kotlin alternative to java.awt.Color that works with Minecraft's integer-packed colour conventions. All component values are in the range 0–255.
Creating colours¶
Constructors¶
KColor¶
Types¶
Companion¶
object Companion
Properties¶
alpha¶
argb¶
The packed ARGB integer representation (in the form 0xAARRGGBB).
blue¶
green¶
red¶
rgb¶
The packed RGB integer representation (no alpha channel, in the form 0xRRGGBB).