RGBA to XYZ Converter
Enter RGBA values (0–255) and instantly get CIE XYZ tristimulus values with alpha composited against white and a live color swatch.
RGBA Input
255
0
0
255
rgba(255, 0, 0, 255)
CIE XYZ Output
Alpha: 255 / 255
(100.0%) — composited against white before XYZ conversion
Conversion Pipeline
- 1 Composite against white (alpha blend): Re=255, Ge=0, Be=0
- 2 sRGB gamma decode (linearize): Rl=1.0000, Gl=0.0000, Bl=0.0000
- 3 Linear RGB → XYZ (D65 matrix): X=0.4125, Y=0.2126, Z=0.0193
Copied!
Summary
Enter RGBA values (0–255) and instantly get CIE XYZ tristimulus values with alpha composited against white and a live color swatch.
How it works
- Enter R, G, B values (0–255) and Alpha (0–255) in the input fields or drag the sliders.
- The RGBA color is composited against white: R_eff = alpha*R/255 + (1-alpha)*255, and similarly for G and B.
- Each effective RGB channel is linearized by reversing the sRGB gamma curve (IEC 61966-2-1).
- The three linear-light values are multiplied by the standard sRGB-to-XYZ D65 matrix to produce X, Y, Z.
- Results are displayed as raw XYZ values (typically 0–1 range) plus a formatted color() CSS string.
- The color swatch previews the original RGBA color at the specified alpha level.
Use cases
- Convert screen or CSS RGBA colors to CIE XYZ for color science work.
- Feed XYZ values into further conversions such as CIELAB or CIELUV.
- Verify sRGB-to-XYZ matrix implementations in color management pipelines.
- Inspect how alpha compositing against white affects the resulting XYZ values.
- Generate XYZ inputs for ICC profile calculations and colorimetric analysis.
- Cross-reference RGBA colors between display space and device-independent XYZ.
- Validate RGBA → XYZ math when implementing color science algorithms.
- Build color palettes by comparing Y (luminance) values across RGBA swatches.
Frequently Asked Questions
Related tools
Last updated: 2026-05-28 ·
Reviewed by Nham Vu