Skip to main content

@microsoft/fast-colors > xyzToRGB

xyzToRGB() function

Converts a ColorXYZ to a ColorRGBA64

Signature:
export declare function xyzToRGB(xyz: ColorXYZ, alpha?: number): ColorRGBA64;

Parameters

ParameterTypeDescription
xyzColorXYZthe xyz color to convert
alphanumberthe alpha value
Returns:

ColorRGBA64

Remarks

Note that the xyz color space is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0