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

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

xyz
requis
TXYZ
CIE XYZ tristimulus tuple [X, Y, Z] normalised to the D65 illuminant.

API

Valeur de retour

La valeur retournée par cet util.

sRGB colour object with r, g, b as integers in [0, 255]. Alpha is not set.

Usage

Exemples

Extraits de code prêts à coller.

XYZ back to sRGB

typescript