Color

constructor()

Constructs a white color (r = g = b = 1).

(three.js's polymorphic Color(r, g, b) constructor also accepts a hex Int, a CSS string or another Color. The Kotlin port splits those into distinct constructors/overloads: Color with three Doubles, with a hex Int, or via copy. The CSS-string path is deferred. See the class doc.)


constructor(r: Double, g: Double, b: Double)

Constructs a color from the RGB components r, g, b (via setRGB, i.e. interpreted in the working color space).


constructor(hex: Int)

Constructs a color from the hexadecimal value hex (via setHex, i.e. interpreted as ColorSpace.SRGB by default).


constructor(color: Color)

Constructs a color as a copy of color.