Documentation / @ripl/core / getColorParser
Function: getColorParser() ​
getColorParser(
value):ColorParser|undefined
Defined in: packages/core/src/color/index.ts:80
Finds the first color parser whose pattern matches the given color string.
Matching is purely pattern-based, so a CSS named color such as red has no parser and returns undefined here even though parseColor resolves it. Reach for parseColor to ask whether a string is a color Ripl understands.
Parameters ​
| Parameter | Type |
|---|---|
value | string |
Returns ​
ColorParser | undefined