Light lab

Wavelength to colour

Slide across the visible spectrum and see roughly what each wavelength of light looks like, with its HEX, RGB and HSL codes, its frequency and its place in the rainbow.

550nm

Green

Wavelength
550 nm
Frequency
545.1 THz
Photon energy
2.25 eV
Rainbow band
Green 495–570 nm
HEX
#A3FF00
RGB
163, 255, 0
HSL
82, 100%, 50%

Drag or tap the bar, or focus it and use the arrow keys (hold Shift for 10 nm steps).

Rainbow bands

Band edges are a convention, not a physical boundary; sources differ by 10–20 nm. Indigo is disputed: many modern references fold it into blue and violet.

Real light sources

Screens can't show pure spectral colours. Every swatch here is an sRGB approximation; the real light is more saturated than any monitor can display, and your screen settings change what you see.

What is wavelength?

Light is an electromagnetic wave, and its wavelength is the distance from one crest to the next. Visible light runs from about 380 nm to 750 nm (a nanometre is a millionth of a millimetre). The exact limits vary from person to person and with brightness. Shorter than that is ultraviolet; longer is infrared. Neither is visible to us.

Wavelength and frequency describe the same thing: frequency is the speed of light divided by wavelength. Green light at 550 nm oscillates about 545 trillion times a second (545 THz). Shorter wavelengths also carry more energy per photon, which is why ultraviolet can burn skin and infrared cannot.

Why seven colours?

The spectrum is continuous. There is no line where green stops and yellow starts. Isaac Newton divided it into seven named colours in the late 1600s, partly to match the seven notes of the Western musical scale. The number stuck through textbooks and mnemonics like VIBGYOR and ROYGBIV. Other languages divide the same spectrum differently, and some name fewer basic colours.

Why is indigo disputed?

Indigo sits in a narrow slice between blue and violet that many people cannot pick out as a separate colour. One common reading is that Newton's "blue" was closer to what we now call cyan, and his "indigo" closer to our blue. Many modern science references list six spectral colours and leave indigo out. The 420–450 nm range used on this page is a convention, nothing more.

Screen colour vs spectral light

A spectral colour is light of essentially one wavelength. A screen makes colour by mixing three primaries: red, green and blue. Every mix it can produce lies inside the triangle those primaries form, and every pure spectral colour lies outside it. So no monitor can show the true colour of a laser or a rainbow; it shows the closest displayable colour it can.

This page uses Dan Bruton's widely used approximation: straight-line ramps between hue anchors at 440, 490, 510, 580 and 645 nm, a brightness falloff below 420 nm and above 700 nm where the eye is less sensitive, and a gamma of 0.8. It is chosen to look right, not to be measured. A colorimetric conversion would go through the CIE 1931 colour matching functions and then clip to sRGB. Treat the HEX value as a good approximation, not a measurement.

Need a web or mobile product built? See what I do.