HEX to XYZ
Convert HEX to CIE XYZ, free and online. Enter a HEX code and get the X, Y and Z tristimulus values on the 0 to 100 scale with the D65 white point, plus color(xyz-d65) and color(xyz-d50) for CSS. Handy for color science, Lab math and checking luminance.
How to convert HEX to XYZ
- 1Type or paste a HEX code into "Color"
- 2Read X, Y and Z in the big line, from 0 to 100
- 3Copy them, or copy the CSS color() form from the list
- X, Y and Z of your color, such as 61.619, 61.725, 9.646
What you get
- Three ways to write it.0 to 100 as tables print it, and color(xyz-d65) and color(xyz-d50) on the 0 to 1 scale
- Both white points.D65 for screens, and D50, the white that Lab and print profiles use
- Nothing is sent anywhere.The matrix math runs in your browser
What you can do
- Turn a HEX code into XYZ, for example #FFC61A into 61.619, 61.725, 9.646
- Copy the same color as color(xyz-d65 0.61619 0.61725 0.09646), the way CSS writes XYZ
- Get the D50 values as well, adapted from D65, in the line "XYZ (D50)"
- Read Y as the relative luminance of the color: 100 is white, 0 is black
- Paste rgb(), hsl(), lab() or a CSS color name instead of HEX, and see Lab, LCH and OKLCH in the same list
Good to know
- The sRGB values are first made linear, then turned into XYZ with the standard sRGB matrix. White #FFFFFF gives 95.047, 100, 108.883
- The big line has three decimals, the CSS lines five. HEX has only 256 steps per channel, so more decimals add no precision
- This page always starts from D65, the white point of sRGB. For D50 take the line "XYZ (D50)" from the list
- To go the other way, with your own scale and white point, use XYZ to HEX
Questions
What are XYZ values?
CIE 1931 XYZ describes a color by three tristimulus values based on how the eye responds to light. Y is the luminance. Other spaces such as Lab and OKLab are calculated from it.
Should I use the 0 to 100 or the 0 to 1 scale?
Both mean the same. Color tables and textbooks usually print 0 to 100, with white at Y = 100. CSS color(xyz) uses 0 to 1. This page gives you both.
What is the difference between D65 and D50?
They are two reference whites. sRGB and most screens use D65, daylight at about 6500 K. Lab in CSS, ICC profiles and print work with D50, so the same color has slightly different numbers.
Is my color uploaded?
No. The HEX code is converted in your browser, and no request is made with it.
More tools in Web & code
That page doesn't exist. Search or drop a file below to find the tool you need.
One site for every file job. What’s yours?
Stop hopping between converter sites. Pick from 410+ tools, or a recipe that chains several.
- Files Stay On Your Device
- No watermark
- Works offline
Drop a file here
A pasted file works too.
or search for a tool
Open an app
From “ugh, this file” to done, in three steps.
- Drop it, or pick a task
No file? Search for what you need. Files are processed on your device, not uploaded for processing.
- Pick what you want
Smaller, another format, signed, merged. One click, no settings to study first.
- Make it a recipe
Need three steps in a row every week? Chain them once and run the same recipe next time.
One approved toolbox for the whole team.
In offices, on building sites and in agencies, teams handle sensitive files all day. ToolRecipe gives everyone the same tools and the same recipes, and the files are processed on each person's own computer.
- Files are processed on the employee's device
- Company recipes everyone runs the same way
- One place instead of ten converter sites