Skip to content

Formatters

This file contains formatter functions.

Functions

hexToRgba()

function hexToRgba(hex, alpha): string;

Defined in: src/utils/formatters.ts:24

Converts a hex color string to an rgba color string.

Parameters

Parameter Type Description
hex string The hex color string to convert.
alpha number The alpha value for the rgba color.

Returns

string

The rgba color string.


toSec()

function toSec(t): number;

Defined in: src/utils/formatters.ts:11

Converts a time string in the format "hh:mm:ss,ms" to seconds.

Parameters

Parameter Type Description
t string The time string to convert.

Returns

number

The time in seconds.