new RGB(r, g, b) → {RGB}
Return an RGB triplet.
Parameters
-
r
numberRed value.
-
g
numberGreen value.
-
b
numberBlue value.
Returns
-
RGBInstance of an RGB triplet.
Source
Methods
static
clone() → {RGB}
Clone the RGB triplet.
Returns
-
RGBCopy of the RGB triplet.
Source
static
isOn() → {boolean}
Detect non-zero RGB color.
Returns
-
booleanTrue if the color is not a perfect black.
Source
static
toStr() → {string}
Convert to a string representation.
Returns
-
stringString (hexadecimal) representation of the RGB triplet.