new RGB(r, g, b) → {RGB}
Return an RGB triplet.
Parameters
-
r
number
Red value.
-
g
number
Green value.
-
b
number
Blue value.
Returns
-
RGB
Instance of an RGB triplet.
Source
Methods
static
clone() → {RGB}
Clone the RGB triplet.
Returns
-
RGB
Copy of the RGB triplet.
Source
static
isOn() → {boolean}
Detect non-zero RGB color.
Returns
-
boolean
True if the color is not a perfect black.
Source
static
toStr() → {string}
Convert to a string representation.
Returns
-
string
String (hexadecimal) representation of the RGB triplet.