openrndr / org.openrndr.color / rgb

rgb

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

Color in RGBa space. Specify one value only to obtain a shade of gray.

Parameters

r - red in [0,1]

g - green in [0,1]

b - blue in [0,1]

fun rgb(hex: String): ColorRGBa (source)

Create color from a string encoded hex value

Parameters

hex - string encoded hex value, for example "ffc0cd"