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
0 – 0.9505
Luminance
0 – 1.0000
Blue-like
0 – 1.0890

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

    1. Set the Hue (0–360°), Whiteness (0–100%), and Blackness (0–100%) using sliders or number inputs.
    2. If Whiteness + Blackness equals or exceeds 100%, both are normalized proportionally (producing a gray).
    3. The HWB values are converted to sRGB (0–255) using the standard CSS Color Level 4 algorithm.
    4. Each sRGB channel is divided by 255 and then gamma-expanded (linearized) to remove the sRGB transfer function.
    5. The linear sRGB triplet is multiplied by the IEC 61966-2-1 D65 matrix to produce X, Y, Z tristimulus values.
    6. 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

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