@microsoft/fast-colors > parseColorWebRGBA
parseColorWebRGBA() function
Converts a rgba color string to a ColorRGBA64.
Signature:export declare function parseColorWebRGBA(raw: string): ColorRGBA64 | null;
Parameters
Parameter | Type | Description |
---|---|---|
raw | string | a color string format "rgba(RR,GG,BB,a)" where RR,GG,BB are [0,255] and a is [0,1] |
ColorRGBA64 | null
Example
parseColorWebRGBA("rgba(255, 0, 0, 1");