Skip to main content
Version: 1.x

@microsoft/fast-colors > parseColorWebRGB

parseColorWebRGB() function

Converts a rgb color string to a ColorRGBA64.

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

Parameters

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

ColorRGBA64 | null

Example

parseColorWebRGB("rgba(255, 0, 0");