Color utility functions.
- Source:
Methods
-
<static> hex2rgb(hex [, out])
-
Converts a hex color number to an [R, G, B] array
Parameters:
Name Type Argument Default Description hex
number Color hex number
out
Array.<number> <optional>
[] Output
- Source:
Returns:
An array representing the [R, G, B] of the color.
- Type
- Array.<number>
-
<static> hex2string(hex)
-
Converts a hex color number to a string.
Parameters:
Name Type Description hex
number Color hex number
- Source:
Returns:
The color string.
- Type
- string
-
<static> rgb2hex(rgb)
-
Converts a color as an [R, G, B] array to a hex number
Parameters:
Name Type Description rgb
Array.<number> List of numbers representing a color.
- Source:
Returns:
The color number in hex.
- Type
- number