SQLRooms

@sqlrooms/utils / getCssColor

Function: getCssColor()

getCssColor(variableName, fallbackColor): string

Safely gets a CSS variable and ensures it's in hex format

Parameters

ParameterTypeDescription
variableNamestringCSS variable name (e.g. '--background')
fallbackColorstringFallback color if the variable isn't found

Returns

string

A color string in hex format