Methods
(static) rgbToHex(rgb) → {string}
Transforms a given rgb() or rgba() string to hex
Parameters:
Name | Type | Description |
---|---|---|
rgb |
- Source:
Returns:
- Type
- string
(static) toHex(val) → {string}
Converts a given color value (0..255) to hex value.
Parameters:
Name | Type | Description |
---|---|---|
val |
number | string |
- Source:
Returns:
zero-padded hex value
- Type
- string