Wavelength nm to RGB color

Useful for students and teaching graphics to show the rough color of a laser or spectral line.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter wavelength.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Dan Bruton algorithm: linear ramps between 440, 490, 510, 580 and 645 nm, intensity falloff near the spectrum edges, then channel = round(255 × (value × intensity)^0.8).

Example

Inputs: Wavelength = 550 nm. Result: HEX code: #A3FF00; Color band: Green; Red R: 163.

Limits and caveats

  • Pure spectral colors are more saturated than any sRGB screen can show, so this is a visual approximation only.
  • Color band limits are approximate and vary slightly between sources.

Questions about this tool

What is the visible spectrum range?

People see roughly from 380 nm (violet) to 780 nm (deep red).

What color is a 532 nm laser?

Bright green, the color of common green laser pointers.

Why is the color darker at the ends?

The eye is less sensitive near 380 and 780 nm, so the algorithm fades intensity there.