Methods
(static) rgbaToValues(rgba) → {Array.<string>}
Extracts the values from a given css-compatible rgba() string.
Parameters:
Name | Type | Description |
---|---|---|
rgba |
string | the css-compatible rgba(r, g, b, a) string |
- Source:
Throws:
-
if given param is not a valid rgb() or rgba() string.
- Type
- TypeError
Returns:
Array with the extracted values. Note they are strings due to the regex match. You need to map them to numbers if necessary.
- Type
- Array.<string>