XyzToRgb
Color
stable
Convert a CIE XYZ (D65) tristimulus value to an sRGB object by applying the sRGB forward matrix and gamma curve, then clamping and rounding to [0, 255].
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- xyzrequiredTXYZ
- CIE XYZ tristimulus tuple [X, Y, Z] normalised to the D65 illuminant.
API
Return value
The value returned by this util.
- sRGB colour object with r, g, b as integers in [0, 255]. Alpha is not set.
Usage
Examples
Ready-to-paste usage snippets.
XYZ back to sRGB