Classes
Methods
(static) getColor(r, g, b) → {string}
- Source:
Get a hex string (#RRGGBB) from r, g, b components.
Parameters:
Name | Type | Description |
---|---|---|
r |
number | |
g |
number | |
b |
number |
Returns:
- Hex color (#RRGGBB)
- Type
- string
(static) hexToRgb(hexString) → {Array.<number>}
- Source:
Get an [r, g, b] array from a hex string.
Parameters:
Name | Type | Description |
---|---|---|
hexString |
string | Hex string (#RRGGBB) |
Returns:
An array of [r, g, b]
- Type
- Array.<number>
(static) hue2rgb(p, q, t) → {number}
- Source:
Converts an HSL (?) representation to RGB.
Parameters:
Name | Type | Description |
---|---|---|
p |
number | |
q |
number | |
t |
number |
Returns:
RGB representation of component.
- Type
- number
(static) rgbToHex(r, g, b) → {string}
- Source:
Convert RGB to a hex string.
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red component. |
g |
number | Green component. |
b |
number | Blue component. |
Returns:
Hex representation.
- Type
- string