Skip to content

Function: hexToRgb()

ts
function hexToRgb(hex): RgbColor;

Converts a hex color string to an RgbColor object.

Parameters

ParameterType
hexstring

Returns

RgbColor

Example

ts
hexToRgb('#ff6600') // => { r: 255, g: 102, b: 0, a: 1 }

Since

1.0.0

Released under the MIT License.