Documentation / @ripl/core / parseColor
Function: parseColor() ​
parseColor(
value):ColorRGBA|undefined
Defined in: packages/core/src/color/index.ts:91
Parses any supported color string into an RGBA tuple, or returns undefined if nothing matches.
The functional and hexadecimal formats are tried first via getColorParser; anything left over falls through to parseKeyword, so a CSS named color such as red or transparent resolves without a CSSOM.
Parameters ​
| Parameter | Type |
|---|---|
value | string |
Returns ​
ColorRGBA | undefined