@microsoft/fast-colors > parseColorWebRGBA

parseColorWebRGBA() function

Converts a rgba color string to a ColorRGBA64.

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

Parameters

ParameterTypeDescription
rawstringa color string format "rgba(RR,GG,BB,a)" where RR,GG,BB are [0,255] and a is [0,1]
Returns:

ColorRGBA64 | null

Example

parseColorWebRGBA("rgba(255, 0, 0, 1");