Skip to content

Color

Color formatting helpers.

Functions

hexToRgba()

function hexToRgba(hex, alpha): string;

Defined in: src/shared/format/color.ts:12

Converts a #rrggbb hex color to an rgba() string.

Parameters

Parameter Type Description
hex string The hex color.
alpha number The alpha channel (0–1).

Returns

string

An rgba(...) string.