Methods
(static) hexToRgb(hex) → {string}
Transforms a given hex value to a css rgb(r, g, b) string
Parameters:
Name | Type | Description |
---|---|---|
hex |
string | the hex color |
- Source:
Returns:
rgb(${r}, ${g}, ${b})
- Type
- string
(static) hexToRgbValues(hex) → {Array.<number>}
Transforms a given hex value to an array of individual rgba components
Parameters:
Name | Type | Description |
---|---|---|
hex |
string | the hex color |
- Source:
Returns:
[r, g, b, a]
- Type
- Array.<number>
(static) hexToRgba(hex) → {string}
Transforms a given hex value to a css rgba(r, g, b, a) string
Parameters:
Name | Type | Description |
---|---|---|
hex |
string | the hex color |
- Source:
Returns:
rgba(${number}, ${number}, ${number}, ${number})
- Type
- string