XYZ to HEX
Convert XYZ to HEX online, free. Paste X, Y and Z from a measurement or a color table, tell the page whether they run from 0 to 100 or 0 to 1 and whether the white is D65 or D50, and get the HEX code for screen. Colors outside sRGB are brought inside the CSS way.
How to convert XYZ values to HEX
- 1Set "Scale of plain numbers" and "White point" to match your data
- 2Type X, Y and Z into "Color", such as 41.239, 21.264, 1.933
- 3Copy the HEX code from the big line
- The HEX code of your XYZ color, such as #FF0000
How it works
- Your scale, your white.Choose 0 to 100 or 0 to 1, and D65 or D50, before you paste the numbers
- CSS syntax works too.color(xyz-d65 …) and color(xyz-d50 …) are read with their own white point
- Nothing is sent anywhere.Your browser does the conversion on your own device
What you can do
- Turn three bare numbers into HEX, for example 41.239, 21.264, 1.933 into #FF0000 on the 0 to 100 scale
- Read values on the 0 to 1 scale, such as 0.4361 0.2225 0.0139 with D50, which is red as well
- Paste color(xyz-d65 0.2 0.4 0.9), color(xyz 0.2 0.4 0.9) or color(xyz-d50 …) straight from a stylesheet
- See Lab, LCH, OKLCH and RGB of the same color in the list, each with a copy button
- Get a note when the color lies outside sRGB, with the nearest HEX that fits shown instead
Good to know
- The two settings only apply to plain numbers and xyz(…). CSS color(xyz-…) is always read on the 0 to 1 scale
- Many XYZ values have no exact HEX: HEX covers only sRGB. Then HEX shows the nearest color inside it, with less chroma at the same lightness and hue
- D50 values are adapted to D65 before they become sRGB. Pick the white point your data was measured with, or the color shifts
- The field starts with the values of a yellow, 61.619, 61.725, 9.646. Replace them with your own
Questions
How do I convert XYZ to HEX?
Choose the scale and white point of your numbers, then type X, Y and Z into the field, separated by spaces or commas. The HEX code appears in the big line.
My values have Y up to 100. Which scale is that?
That is the 0 to 100 scale, the one most tables and spectrophotometer readouts use, and the one this page starts with. If white has Y = 1, choose "0 to 1".
Why does the page say my color is outside sRGB?
XYZ can describe every color the eye sees, but a HEX code can only hold sRGB. The page then gives the nearest sRGB color, found as CSS Color 4 describes, and keeps Lab and OKLCH unchanged.
Can I convert D50 values?
Yes. Set "White point" to D50. The numbers are adapted to D65, the white of sRGB, before the HEX code is worked out.
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