Skip to content

tryParseCssColor

tryParseCssColor(source): CssColor | null

Defined in: packages/format-css-color/src/parse-css-color.ts:410

Parses one CSS <color>, or reports failure without throwing.

For the common case of validating untrusted input, where a throw would be control flow rather than an error.

string

CssColor | null