← Physics you can see
Rydberg formula

Starlight has a barcode.

Every element absorbs or emits light at its own exact wavelengths. Drag the electron's jump below to see one hydrogen line appear — then look at real starlight, where dozens of these lines together spell out what a star is made of.

1λ = R ( 122 1n2 )
n→∞
emits a photon at
Upper level n electron drops n → 2
n = 3bigger jump · bluer lightn = 9
Wavelength emitted
nm
380 nmvisible light750 nm
Try

Now look at real starlight.

A star's own light passes through its cooler outer gas on the way out, and each element there removes — absorbs — its own exact wavelengths, leaving dark gaps in an otherwise full rainbow. Pick a star to see which elements' fingerprints show up in its spectrum.

380 nmviolet → red750 nm

The Rydberg formula above predicts the exact wavelengths of the hydrogen atom's Balmer series (transitions that land on n=2), using R = 1.097 × 107 m−1. As n climbs toward infinity the lines crowd together and converge on the series limit at 364.6 nm — the slider stops at n=9 (383.7 nm) because lines much past that sit right at the edge of what the eye can see. The hero panel on the right shows an emission line: a single bright color against black, the way a gas-discharge tube (like a neon sign) actually looks. Real starlight instead shows absorption: a continuous rainbow with narrow dark gaps where each element on the way out removed its own wavelengths — that's what the bar below the star picker shows, and hydrogen's own dark gaps sit at these same four Balmer wavelengths. The relative darkness of each element's lines per star is an honest but qualitative illustration of a well-established real pattern in stellar spectral classification (the Morgan–Keenan OBAFGKM sequence), not a precise measured equivalent width. Effective temperatures used: Rigel ~12,100 K, Sirius A ~9,940 K, the Sun 5,778 K, Betelgeuse ~3,600 K. Titanium oxide's absorption is shown at its two strongest real band heads (615.9 nm and 705.8 nm) rather than as a sharp line, since a molecule's absorption spans a band of wavelengths, not one exact point the way a single atom's does.