Function: hexToRgb()
hexToRgb(
hex
):RGB
Converts a hex color code to RGB values.
Parameters
Parameter | Type | Description |
---|---|---|
hex | string | The hex color code. |
Returns
An object with r, g, and b properties, and an optional a property if the input includes alpha.
Throws
If the input is not a valid hex color code.
Defined in
conversions/components/hex.ts:49