Skip to main content
Version: 1.x

@microsoft/fast-colors > parseColor

parseColor() function

Expects any of the following and attempts to determine which is being used #RRGGBB, #AARRGGBB, rgb(RR,GG,BB) rgba(RR,GG,BB,a), or any of the CSS color names.

Signature:
export declare function parseColor(raw: string): ColorRGBA64 | null;

Parameters

ParameterTypeDescription
rawstringthe color string to parse
Returns:

ColorRGBA64 | null