HWB to XYZ Converter
Enter HWB values and instantly get the CIE XYZ tristimulus values with a live color swatch and step-by-step conversion math.
HWB Input
210°
10%
20%
hwb(210 10% 20%)
CIE XYZ Output
Red-like
Luminance
Blue-like
Intermediate Linear sRGB (0 – 1)
sRGB gamma-expanded to linear light; multiplied by IEC 61966-2-1 D65 matrix.
Conversion Steps
Follow the math — each intermediate value is shown below.
Copied!
Summary
Enter HWB values and instantly get the CIE XYZ tristimulus values with a live color swatch and step-by-step conversion math.
How it works
- Set the Hue (0–360°), Whiteness (0–100%), and Blackness (0–100%) using sliders or number inputs.
- If Whiteness + Blackness equals or exceeds 100%, both are normalized proportionally (producing a gray).
- The HWB values are converted to sRGB (0–255) using the standard CSS Color Level 4 algorithm.
- Each sRGB channel is divided by 255 and then gamma-expanded (linearized) to remove the sRGB transfer function.
- The linear sRGB triplet is multiplied by the IEC 61966-2-1 D65 matrix to produce X, Y, Z tristimulus values.
- Click "Copy color()" to copy the CSS color(xyz-d65 X Y Z) string or click any channel icon to copy a single value.
Use cases
- Convert CSS hwb() color values to CIE XYZ for color science pipelines.
- Feed XYZ tristimulus values into L*a*b*, L*u*v*, or chromatic adaptation transforms.
- Verify HWB-to-XYZ output when building design tools or custom color pickers.
- Prepare color data for ICC profile work or print production workflows.
- Cross-reference CSS HWB colors with CIE XYZ for textile or physical color matching.
- Understand the full HWB→sRGB→linear→XYZ chain by inspecting every intermediate value.
- Build tone-mapping or gamut-mapping pipelines that operate in CIE XYZ space.
- Generate XYZ reference values for unit tests of custom color conversion libraries.
Frequently Asked Questions
Related tools
Last updated: 2026-05-28 ·
Reviewed by Nham Vu