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)

RGBA Output

Conversion Steps

  1. 1 XYZ input: X=0.4124, Y=0.2126, Z=0.0193
  2. 2 XYZ → Linear RGB (D65 matrix): Rl=1.0000, Gl=0.0000, Bl=0.0000
  3. 3 Linear RGB → sRGB (gamma encode): R=1.000, G=0.000, B=0.000
  4. 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

  1. Enter X, Y, and Z values using number inputs or sliders (normalized range 0-1, or up to 2 for out-of-gamut exploration).
  2. Set the Alpha value between 0 (fully transparent) and 1 (fully opaque).
  3. XYZ values are multiplied by the inverse sRGB D65 matrix to produce linear RGB channel values.
  4. Linear RGB is gamma-encoded with the sRGB transfer function (IEC 61966-2-1) to produce non-linear sRGB in the 0-1 range.
  5. Values are scaled to 0-255 and clamped to the nearest displayable integer. Alpha is kept in 0-1.
  6. The rgba() CSS string is derived from the clamped integers and the alpha value.
  7. 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

Last updated: 2026-07-01 · Reviewed by Nham Vu