rgb

fun rgb(r: Double, g: Double, b: Double, a: Double = 1.0): ColorRGBa

Shorthand for calling ColorRGBa. Specify only one value to obtain a shade of gray.

Parameters

r

red in [0,1]

g

green in [0,1]

b

blue in [0,1]

a

alpha in [0,1], defaults to 1.0

fun rgb(gray: Double, a: Double = 1.0): ColorRGBa

Shorthand for calling ColorRGBa.

Parameters

gray

shade of gray in [0,1]

a

alpha in [0,1], defaults to 1.0

fun rgb(hex: String): ColorRGBa

Shorthand for calling ColorRGBa.fromHex. Creates a ColorRGBa from a hex string.

Parameters

hex

string encoded hex value, for example "ffc0cd"