hexToRgb()
The hexToRgb
function allows you to convert a hexadecimal color value to its corresponding RGB value.
Usage
Parameters
hexToRgb(colorValue)
Parameter | Type | Required | Description |
---|---|---|---|
colorValue | string | true | HEX code of the color with optional # . Accepts shorthand notation and alpha channel. |
Return Value
The hexToRgb
function returns an RGB object of the color value.