How to use it
Pick a tab. Blackbody shows how the glow of a hot object changes with temperature. Elements shows the bright lines of hot hydrogen, helium, sodium, mercury and neon, or the dark lines the same gases cut out of white light. Hydrogen atom links those lines to the energy levels of the electron. Light sources compares a light bulb, sunlight, a white LED and a fluorescent tube.
The strip at the top is a virtual spectroscope: light spread out by wavelength, violet on the left and red on the right, as a prism or a grating shows it. The graph below shows the same light as a curve.
Controls
- Blackbody: temperature slider (1000–12 000 K) and presets; pin curves to compare them, use a logarithmic axis or zoom the graph to the visible range.
- Spectroscope: click or tap a line to read its wavelength, photon energy and frequency. Zoom goes up to 64×; drag the strip to pan.
- Keyboard: on the strip or graph the arrow keys move the cursor, + and − zoom, [ and ] jump between lines; on the energy-level diagram the arrow keys pick a jump and Enter emits the photon.
- Compare: add a second strip, or overlay a blackbody of the same colour temperature on a lamp.
How it works
Everything glows because of its temperature. An ideal emitter, called a blackbody, follows Planck’s law, where h is Planck’s constant, c the speed of light and k Boltzmann’s constant:
A hotter body peaks at a shorter wavelength (Wien’s displacement law) and radiates far more power per square metre (Stefan–Boltzmann law):
The swatch weights the spectrum with the CIE 1931 colour-matching functions (from the official CIE table in 5 nm steps) and converts it to sRGB. Screens cannot show pure spectral colours, so the strip shows them as saturated as possible and lifts the dim violet and deep-red ends a little.
A hot, thin gas emits only at the wavelengths of jumps between the energy levels of its atoms, which gives a line spectrum. White light passing through the gas loses the same wavelengths, which gives dark absorption lines. For hydrogen the levels are En = −13.6 eV / n², and the wavelengths follow the Rydberg formula:
Only jumps down to n = 2, the Balmer series, land in the visible range. The formula gives vacuum wavelengths; the page also converts them to air, as tables list visible lines. It ignores the tiny fine-structure splitting, so its air values differ from the measured lines by up to about 0.01 nm. Wavelengths and relative intensities of the five elements come from the NIST Atomic Spectra Database (air wavelengths); real intensities depend on the lamp.
The lamps are simple models: the bulb is a blackbody at the filament temperature, sunlight a 5772 K blackbody with the main Fraunhofer lines, the white LED a blue peak at 450 nm plus broad phosphor bands, and the fluorescent tube mercury lines plus blue, green and red phosphor bands. The correlated colour temperature is the temperature of the blackbody whose colour is closest in the CIE 1960 uv diagram. For light as a wave, see the wave simulator; for prisms and lenses, ray optics.
Things to try
- Slide up from 1000 K: the swatch turns from dull red through orange and white to bluish white. Where is the peak when it looks white?
- Zoom in on sodium at 589 nm until the yellow line splits into the D doublet, 0.6 nm apart.
- Show sodium in absorption and compare it with sunlight: the Sun’s dark D lines sit in exactly the same place.
- Step up the Balmer series: the lines crowd towards the series limit at 364.6 nm.
- Turn on the blackbody overlay for the white LED: the colour matches, yet the spectrum looks nothing like a blackbody.
Frequently asked questions
The Sun’s peak is near 500 nm. Why does sunlight look white?
Its spectrum is broad and covers all visible colours fairly evenly, which the eye sees as white. The colour at the peak is not the colour of the light.
Why do stars have different colours?
Their surfaces have different temperatures: cool red stars are around 3000 K, the Sun 5772 K, and blue-white stars more than 10 000 K.
Why does a cool gas make dark lines?
Its atoms absorb photons that match a jump up from an occupied level and send them out again in all directions, so less of that wavelength reaches you. Cool sodium vapour absorbs the yellow D lines strongly. The visible lines of hydrogen, helium, mercury and neon start from excited levels, so those gases absorb them only when hot, as in a star’s atmosphere.
Is a white LED a blackbody?
No. A semiconductor chip makes blue light and a phosphor turns part of it into yellow (and red in warm-white LEDs). Its colour temperature only says which blackbody looks the same colour.
Sources
- Planck M (1901). Ueber das Gesetz der Energieverteilung im Normalspectrum. Annalen der Physik 309(3), 553–563. Planck’s law of blackbody radiation.
- Kramida A, Ralchenko Yu, Reader J and NIST ASD Team (2024). NIST Atomic Spectra Database, version 5.12. National Institute of Standards and Technology. The air wavelengths and relative intensities of the hydrogen, helium, sodium, mercury and neon lines.
- CIE (2019). CIE 1931 colour-matching functions, 2 degree observer (data table). International Commission on Illumination. The weights behind the colour swatches.