Color to wavelength
Enter a color in any format and get its dominant wavelength in nanometres: the single wavelength of light that, mixed with white, looks the same. The page also gives the excitation purity, and the complementary wavelength for purples.
Mixed with white, light of this wavelength matches the color. Band: orange.
Your color
The pure wavelength, 591 nm
Nearest screen color: a single wavelength is more saturated than an sRGB screen can show.
- Excitation purity: 86.3%
- CIE xy: 0.5441, 0.4061
- HEX rounding range: 590.9 nm – 591.1 nm
- White point: D65, CIE 1931 2° observer
Drag the marker to change the wavelength: purity and lightness stay as they were.
How the wavelength is calculated
The color is converted to CIE XYZ and placed on the CIE 1931 xy chromaticity diagram. A straight line is drawn from the white point D65, the white of sRGB screens, through the color and on until it meets the curved edge of the diagram, where the single wavelengths lie. The wavelength at that point is the dominant wavelength λd. The edge is the CIE 1931 2° observer table at 1 nm steps, the same data as wavelength to color, which goes the other way.
Excitation purity is the distance from white to the color divided by the distance from white to that edge. If the line meets the straight bottom edge instead, the line of purples, the color is a purple: the line is drawn the other way from white, and the wavelength found there is reported as the complementary wavelength λc.
The diagram under the tool draws exactly this: the white point, your color, and the line to the edge. The marker on the spectrum bar shows where that wavelength sits among the visible colors.
A color does not have one wavelength. Many different spectra look identical (metamerism), and the dominant wavelength is only the simplest of them. It also depends on the white point: with another illuminant the same color gives a slightly different number.
Wavelength of red, green and blue light
The usual names of the spectral bands. The borders between them are a convention, and different books draw them a few nanometres apart.
| Color | Wavelength |
|---|---|
| Violet | 380–450 nm |
| Blue | 450–485 nm |
| Cyan | 485–500 nm |
| Green | 500–565 nm |
| Yellow | 565–590 nm |
| Orange | 590–625 nm |
| Red | 625–750 nm |
The pure colors of an sRGB screen, computed with this tool. Screen red lands in the orange band: it is a broad mix of light, not a single wavelength, so its dominant wavelength need not match what the name suggests.
| Color | Wavelength | Purity |
|---|---|---|
| sRGB red #FF0000 | 611.3 nm | 91.7% |
| sRGB green #00FF00 | 549.1 nm | 73.4% |
| sRGB blue #0000FF | 464.3 nm | 92.5% |
| Yellow #FFFF00 | 570.5 nm | 79.2% |
| Cyan #00FFFF | 491.5 nm | 32.1% |
| Magenta #FF00FF | 549.1 nm (λc) | 68.7% |
sRGB vs Display P3 vs Rec.2020
On the even u′v′ diagram Display P3 covers about 26% more area than sRGB, and Rec.2020 about 72% more.
A screen mixes three primaries, so everything it can show lies inside the triangle between them. sRGB is the web default. Display P3 pushes red and green outward and keeps the same blue. Rec.2020 is the standard for 4K and 8K television; its primaries sit almost on the edge of the horseshoe, and current displays cannot reach all of it. It holds all of sRGB and almost all of Display P3: the red corner of P3 lies just outside its triangle.
| Color space | Area vs sRGB, u′v′ | Area vs sRGB, xy | Share of visible, u′v′ | Red (x, y) | Green (x, y) | Blue (x, y) |
|---|---|---|---|---|---|---|
| sRGB | 100.0% | 100.0% | 33.2% | 0.64, 0.33 | 0.3, 0.6 | 0.15, 0.06 |
| Display P3 | 125.6% | 135.7% | 41.7% | 0.68, 0.32 | 0.265, 0.69 | 0.15, 0.06 |
| Rec.2020 | 172.3% | 189.1% | 57.2% | 0.708, 0.292 | 0.17, 0.797 | 0.131, 0.046 |
Areas are computed here from the primaries and the CIE 1931 2° observer. They compare the triangles on the diagram, not the number of colors, because the diagram leaves out brightness. The more even u′v′ diagram is the fairer of the two, and it is where the common «P3 is about 25% larger» comes from.
Color to wavelength: questions
- What is the wavelength of a color?
- Most colors are not one wavelength but a mix of many. Colorimetry gives each color a dominant wavelength instead: the single wavelength that, mixed with white light, matches the color. This page computes it from the color’s position on the CIE 1931 chromaticity diagram.
- What is the wavelength of red, green and blue?
- As bands of the spectrum, red is roughly 625–750 nm, green 500–565 nm and blue 450–485 nm; the borders are a convention. The pure screen primaries of sRGB have dominant wavelengths of about 611.3 nm (red), 549.1 nm (green) and 464.3 nm (blue), computed here against the D65 white point.
- Why does purple or magenta have no dominant wavelength?
- Purples are mixtures of red and blue light. No single wavelength looks purple, so the line from white through a purple runs into the straight “line of purples” instead of the spectrum. Colorimetry then gives the complementary wavelength λc: the wavelength of light that, mixed with the purple in the right amount, gives white.
- What is excitation purity?
- How far the color is from white towards its spectral color, as a share of the whole way. 0% is white, 100% is the pure wavelength. Screen colors never reach 100%, because a screen cannot show single-wavelength light.
- Why do deep reds all give the same wavelength?
- From about 700 nm to the end of the visible range, light of every wavelength has the same chromaticity, so a color cannot tell them apart; the page shows “≥ 700 nm”. Near the violet end the spectrum also changes very little, so the 8-bit rounding of a HEX code moves the result by several nanometres. The page shows that range when it is wider than 0.1 nm.
- How much bigger is Display P3 than sRGB?
- On the chromaticity diagram its triangle covers 25.6% more area than sRGB in the CIE 1976 u′v′ plane and 35.7% more in CIE 1931 xy. That is why you see different figures: they depend on the diagram used. Rec.2020 is 72.3% larger than sRGB in u′v′. Area on the diagram is not a count of colors, because it leaves out brightness.
- Will another tool give the same number?
- Only if it uses the same white point and observer. This page uses D65, the white of sRGB, and the CIE 1931 2° observer. A source that uses another white, such as CIE illuminant C or the equal-energy white E, gives a slightly different dominant wavelength for the same color.
Sources
- International Commission on Illumination (CIE) (2019). Colour-matching functions of CIE 1931 standard colorimetric observer (dataset), 360–830 nm in 1 nm steps, from CIE 018:2019. Licence CC BY-SA 4.0. DOI
- W3C. CSS Color Module Level 4: predefined color spaces sRGB, Display P3 and ITU-R BT.2020 (primary chromaticities, white point). Link