XYZ to RGB Converter
Enter CIE XYZ tristimulus values and instantly get the equivalent sRGB (0–255) color with a live preview swatch.
CIE XYZ Input
0.4124
0.2126
0.0193
#FF0000
This XYZ color is outside the sRGB gamut. RGB values have been clamped to 0–255.
RGB Output
Conversion Steps
- 1 XYZ input: X=0.4124, Y=0.2126, Z=0.0193
- 2 XYZ → Linear RGB (D65 matrix): Rl=1.0000, Gl=0.0000, Bl=0.0000
- 3 Linear RGB → sRGB (gamma encode): R=1.000, G=0.000, B=0.000
- 4 Scale & clamp to 0–255: R=255, G=0, B=0 (#FF0000)
Copied!
Summary
Enter CIE XYZ tristimulus values and instantly get the equivalent sRGB (0–255) color with a live preview swatch.
How it works
- Enter X, Y, and Z values using the number inputs or sliders (typical range 0–1 for normalized XYZ, or 0–100 for percentage scale).
- XYZ values are multiplied by the inverse sRGB D65 matrix to produce linear RGB channel values.
- Linear RGB is gamma-encoded with the sRGB transfer function (IEC 61966-2-1) to produce non-linear sRGB in the 0–1 range.
- Values are scaled to 0–255 and clamped to the nearest displayable integer.
- The HEX code and rgb() CSS string are derived from the clamped integers.
- A live color swatch previews the result; out-of-gamut inputs are clamped to the nearest displayable color.
Use cases
- Convert spectrophotometer XYZ measurements into web-ready RGB color codes.
- Verify that a CIE XYZ color specification is within the sRGB gamut.
- Translate color science data (ICC profiles, ΔE calculations) into CSS/HTML values.
- Generate HEX codes from XYZ brand color definitions in standards documents.
- Cross-reference CIE XYZ paint or ink specifications with digital sRGB equivalents.
- Bridge colorimetry workflows with front-end development color systems.
- Quickly estimate the sRGB appearance of an XYZ color from a color chart or research paper.
- Build color palettes starting from device-independent CIE XYZ primaries.
Frequently Asked Questions
Related tools
Last updated: 2026-05-28 ·
Reviewed by Nham Vu