Skip to main content

@microsoft/fast-colors > labToRGB

labToRGB() function

Converts a ColorLAB to a ColorRGBA64

Signature:
export declare function labToRGB(lab: ColorLAB, alpha?: number): ColorRGBA64;

Parameters

ParameterTypeDescription
labColorLABthe LAB color to convert
alphanumberthe alpha value
Returns:

ColorRGBA64

Remarks

Note that the xyz color space (which the conversion from LAB uses) is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0