Companion

Holds shared color constants. Every one but TRANSPARENT is opaque, with each channel either full or zero, except GRAY, whose channels are all 0x80.

Samples

assertPrints(Color.BLACK, "Color(#000000ff)")
assertPrints(Color.RED, "Color(#ff0000ff)")
assertPrints(Color.YELLOW.green, "1.0")
assertPrints(Color.GRAY, "Color(#808080ff)")
assertPrints(Color.CYAN.withAlpha(0.5f), "Color(#00ffff80)")

Properties

Link copied to clipboard

Opaque black, #000000ff.

Link copied to clipboard
val BLUE: Color

Opaque blue, #0000ffff.

Link copied to clipboard
val CYAN: Color

Opaque cyan, green and blue at full, #00ffffff.

Link copied to clipboard
val GRAY: Color

Opaque middle gray, every channel 0x80, #808080ff: halfway from BLACK to WHITE.

Link copied to clipboard

Opaque green, #00ff00ff.

Link copied to clipboard

Opaque magenta, red and blue at full, #ff00ffff.

Link copied to clipboard
val RED: Color

Opaque red, #ff0000ff.

Link copied to clipboard

Black at zero alpha: draws nothing.

Link copied to clipboard

Opaque white, the identity tint.

Link copied to clipboard

Opaque yellow, red and green at full, #ffff00ff.