XYZ to RGBA Converter
Enter CIE XYZ values and an alpha (0-1) to instantly get the RGBA color with a live preview swatch.
CIE XYZ + Alpha Input
0.4124
0.2126
0.0193
1.00
rgba(255, 0, 0, 1)
This XYZ color is outside the sRGB gamut. RGB values have been clamped to 0-255.
RGBA 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 & add alpha: R=255, G=0, B=0, A=1 (rgba(255, 0, 0, 1))
Copied!
Summary
Enter CIE XYZ values and an alpha (0-1) to instantly get the RGBA color with a live preview swatch.
How it works
- Enter X, Y, and Z values using number inputs or sliders (normalized range 0-1, or up to 2 for out-of-gamut exploration).
- Set the Alpha value between 0 (fully transparent) and 1 (fully opaque).
- 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. Alpha is kept in 0-1.
- The rgba() CSS string is derived from the clamped integers and the alpha value.
- A live color swatch previews the result including transparency. Out-of-gamut inputs are clamped to the nearest displayable color.
Use cases
- Convert spectrophotometer XYZ measurements into web-ready RGBA color codes with transparency.
- Add an alpha/opacity channel to a color defined in CIE XYZ space.
- Verify that a CIE XYZ color specification is within the sRGB gamut.
- Translate color science data (ICC profiles, delta-E calculations) into CSS rgba() values.
- Generate semi-transparent overlays from XYZ brand color definitions in standards documents.
- 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 with per-color opacity starting from device-independent CIE XYZ primaries.
Frequently Asked Questions
Related tools
Last updated: 2026-05-28 ·
Reviewed by Nham Vu