RgbtoXyz
Color
stable
Convert an sRGB colour to the CIE XYZ (D65) colour space by linearising the sRGB gamma curve then applying a 3x3 matrix transform. Used internally for APCA contrast and lighten/darken operations.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- {r, g, b}requiredTRGBA
API
Return value
The value returned by this util.
- CIE XYZ tristimulus tuple [X, Y, Z] normalised to the D65 illuminant.
Usage
Examples
Ready-to-paste usage snippets.
sRGB red to XYZ