Light Spectrum Analyzer & Wavelength Simulator

simulator intermediate ~9 min
Loading simulation...
550nm — pure spectral green

A 550nm peak with 40nm bandwidth produces a saturated green. The eye's luminosity function peaks near this wavelength, making green the brightest perceived spectral color.

Formula

X = ∫ SPD(λ) · x̄(λ) dλ, Y = ∫ SPD(λ) · ȳ(λ) dλ, Z = ∫ SPD(λ) · z̄(λ) dλ
Gaussian SPD: I(λ) = I₀ · exp(−(λ − λ_peak)² / (2σ²))

Light as Wavelength

Isaac Newton demonstrated in 1666 that white light is a mixture of all colors by splitting sunlight through a prism. Each color corresponds to a wavelength of electromagnetic radiation: violet at 380nm, blue at 450nm, green at 520nm, yellow at 580nm, orange at 600nm, and red at 700nm. This simulation lets you build custom spectral power distributions and see how they map to perceived color through the CIE color matching functions.

Spectral Power Distributions

Every light source has a unique spectral fingerprint — its spectral power distribution (SPD). A sodium lamp emits almost exclusively at 589nm, producing a narrow yellow spike. A fluorescent tube has sharp mercury emission lines plus phosphor broadband emission. Sunlight approximates a smooth 5800K black body curve. The SPD completely determines the light's color, brightness, and rendering properties. Adjust the peak wavelength and bandwidth to explore how spectral shape maps to perceived color.

From Photons to Color

Your retina converts the continuous spectrum into just three signals via L, M, and S cone cells. The CIE 1931 color matching functions formalize this: they define how to integrate any SPD into three tristimulus values (X, Y, Z) that uniquely specify the perceived color. This three-dimensional reduction means infinitely many spectra can produce the same perceived color — a phenomenon called metamerism. It is also why RGB displays, with only three wavelengths, can reproduce millions of perceived colors.

Applications

Spectral analysis is fundamental to lighting design, display engineering, photography, astronomy, and material science. Color rendering index (CRI) evaluates how faithfully a light source renders colors by comparing its SPD to a reference illuminant. Display gamuts are defined by the chromaticity coordinates of their primary SPDs. Astronomers determine stellar composition by analyzing absorption lines in stellar spectra. Every field that works with light ultimately works with spectral power distributions.

FAQ

What is the visible light spectrum?

The visible spectrum spans approximately 380nm (violet) to 700nm (red). Each wavelength corresponds to a specific spectral color: violet, blue, cyan, green, yellow, orange, red. White light contains all visible wavelengths. Most real-world colors are mixtures of wavelengths described by their spectral power distribution (SPD).

What is a spectral power distribution?

A spectral power distribution (SPD) describes the intensity of light at each wavelength. A laser has a spike at one wavelength (narrow SPD). A lightbulb has a broad SPD across the visible range. The sun approximates a 5800K black body SPD. The shape of the SPD determines the perceived color when integrated against the human cone response functions.

What is metamerism?

Metamerism occurs when two physically different spectra produce the same perceived color. For example, a single 590nm yellow wavelength and a mix of 550nm green plus 640nm red can look identical. This is why RGB screens can reproduce most colors with just three primaries — and why a dress can look different colors under different lighting.

How does the eye convert wavelengths to color?

The retina has three cone types (L, M, S) with overlapping spectral sensitivities. Each cone integrates the incoming spectrum weighted by its sensitivity curve, producing three signals. The brain interprets these three numbers as color. This is why we need only three primaries (RGB) to reproduce most perceived colors — matching the three cone responses is sufficient.

Sources

Embed

<iframe src="https://homo-deus.com/lab/color-science/spectral-analysis/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub