🌈 Reading Starlight

How scientists know what a star is made of, how hot it is and how fast it is moving — without ever going there. Science Centre Observatory, Jurong.
The short version

Spread a star’s light into a rainbow and it is crossed by dark lines, like a barcode. Every element makes its own pattern — so the barcode tells us what the star is made of.

574
dark lines Joseph von Fraunhofer mapped in sunlight in 1814. Nobody knew what they were for another 45 years.
27 years
between finding helium in the Sun’s light (1868) and finding it on Earth (1895).
25 cm/s
— under 1 km/h. The ESPRESSO spectrograph in Chile can tell when a distant star drifts towards us that slowly.
Chapter 1

🔦 The light lab: three kinds of rainbow

In 1859 Gustav Kirchhoff and Robert Bunsen worked out the rules. Pick a light source below and watch what reaches the rainbow. Each dot is a little packet of light — a photon — with its own colour.

1 · Continuous spectrumA hot, dense glowing thing — a light-bulb filament, molten metal, the deep layers of a star — gives every colour: a smooth rainbow.
2 · Absorption linesShine that light through cooler gas and the gas takes out its own colours, leaving dark lines. Starlight looks like this: the star’s outer layers are the gas.
3 · Emission linesHot, thin gas on its own glows only in those same colours: bright lines on black. Neon signs and glowing nebulae look like this.

The lab is drawn for clarity, not to scale. Notice in the middle mode that the gas does not destroy the light it catches — it sends it back out in random directions, which is why the same gas, seen from the side, glows with bright lines.

Chapter 2

🪜 Why only certain colours? The atom’s ladder

An atom’s electron can only sit on certain “rungs” of energy, like a ladder with no in-between steps. When it drops from a higher rung to a lower one, it throws out a photon carrying exactly the energy of that drop — and energy means colour. Hydrogen’s rungs give it four visible colours.

💡 The colours are not guesses — they come out of one formula. In 1885 a Swiss schoolteacher, Johann Balmer, found the pattern in hydrogen’s four visible lines; the page works out every wavelength above from the modern version of his rule (the Rydberg formula). Drops to the bottom rung give ultraviolet light, and drops to the third rung infrared, both invisible to our eyes but seen by telescopes.
Chapter 3

🏷️ Every element has a barcode

Heat any element in a laboratory and it glows with its own unique set of colours — its fingerprint. Then compare it with the Sun: tap an element and its lines light up on the Sun’s spectrum. Where they match, that element is in the Sun.

The Sun’s spectrum

Tap an element below to compare its barcode with the Sun.

Laboratory barcodes (bright lines from hot gas)

Wavelengths in nanometres (nm, billionths of a metre), from the US National Institute of Standards and Technology’s atomic spectra tables and Fraunhofer’s line list; brightness is simplified. “Iron” shows only its strongest lines — it really has thousands.

Chapter 4

🕵️ Spectrum detective

Your turn. Each mystery spectrum below came from a real kind of object. Switch on the elements you think are there — their lines appear as markers above it. A coloured dot means that line is in the mystery spectrum; a red ✗ means it isn’t. An element is only there if all its lines are. When you think you have them all, press Check.

Pick a mystery, then test some elements.
Chapter 5

🌡️ A star’s colour is its thermometer

Heat a poker in a fire and it glows dull red, then orange, then yellow-white. Stars work the same way: the hotter the surface, the more the light shifts towards blue. Slide the temperature and watch the curve, the colour and the star’s class change.

Surface temperature
—
Brightest colour
—
Star class
—
Each square metre shines
—

The star classes: O B A F G K M

Hottest on the left. Astronomers remember the order with “Oh Be A Fine Girl/Guy, Kiss Me”. Tap a class to try it.

The woman who found what stars are made of. Around 1900 Annie Jump Cannon and the women “computers” of Harvard sorted hundreds of thousands of star spectra by eye into these classes — Cannon alone classified some 350,000. In 1925 Cecilia Payne used the new physics of atoms to show why the spectra differ: mostly temperature, not ingredients. Her surprise was that stars are made almost entirely of hydrogen and helium. Senior astronomers doubted it, and she was persuaded to call her result “almost certainly not real” — but within four years it was confirmed. Today it is the bedrock of astronomy.
Chapter 6

🚀 Moving lines: the Doppler shift

When a star moves towards us its light waves are squashed together, so every line slides a little towards blue. When it moves away they are stretched towards red. It is the same effect that makes an ambulance siren drop in pitch as it passes. Measure the slide and you have the speed.

Speed along our line of sight
—
Shift of the red hydrogen line
—
Size of the shift
—
🧾 One spectrum, six answers. What it is made of — which barcodes appear. How hot — its colour, and which lines are strong. How fast it moves towards or away from us — the shift. How fast it spins — spinning smears each line wider. Its magnetism — magnetic fields split lines in two (how George Ellery Hale found in 1908 that sunspots are giant magnets). Hidden company — lines that wobble back and forth betray an unseen star or planet tugging on it.
Chapter 7

🔭 Spectroscopy at SCOB tonight

The Observatory uses this idea every time its Seestar S30 photographs a nebula from the middle of Jurong. Its built-in dual-band filter lets through just two narrow slices of colour — a 30 nm window around the green-blue oxygen line (OIII, 500.7 nm) and a 20 nm window around the red hydrogen line (Hα, 656.3 nm) — and blocks the rest.

Nebula light let through
—
City glow let through
—
Nebula stands out
—

A simplified model: the nebula’s line strengths are typical of the Orion Nebula; the city glow is a typical white LED street light — by early 2023 the Land Transport Authority had switched 99% of the 110,000 street lights it looks after from orange sodium lamps to white LEDs. Galaxies and star clusters shine at every colour, like the street lights, which is why the filter cannot help with them. More on the filters and light pollution pages.

Star colours you can see tonight

The brightest stars from Singapore, hottest first, with their height above the Observatory. Through the deck telescopes the colour difference is easy — compare blue-white Rigel with orange Betelgeuse in Orion, or Spica with Arcturus. Throwing the view very slightly out of focus makes the colour easier to see.

Chapter 8

🛠️ Make your own spectroscope

The tiny tracks on a CD or DVD split light just like a prism. With a box and some tape you can see the barcodes of the lamps around you — tonight.

  1. Find a small box (a tea or tissue box works) and an old CD or DVD you no longer need. A DVD’s tracks are closer together, so it spreads the colours wider.
  2. At one end cut a window about 2 cm tall and cover it with two pieces of card or aluminium foil, taped so that only a very thin slit is left between them — about 1 mm. The thinner the slit, the sharper the lines.
  3. Tape the disc inside the opposite end, shiny side facing the slit, tilted at about 45°. Cut a peephole in the top or side of the box above the disc.
  4. Point the slit at a lamp and look through the peephole at the disc. Tilt the box until a rainbow appears. Try every lamp you can find.
  5. Compare what you see with the barcodes below. A torch or a filament bulb gives a smooth rainbow; fluorescent tubes and neon signs give bright lines.
⚠️ Never point your spectroscope — or anything else — at the Sun. It can permanently damage your eyes. For sunlight, point the slit at a bright white cloud or a sunlit sheet of paper. With a really fine slit you may even glimpse Fraunhofer’s dark lines.

What the lamps around you look like

On the deck, astronomers do the same with a tiny diffraction grating such as the Star Analyser, which screws into a telescope’s eyepiece or camera like a filter and turns every star into a short spectrum.

Chapter 9

🏛️ How we learned to read starlight

1666
Isaac Newton splits sunlight with a prism and calls the band of colours a “spectrum”.
1802
William Wollaston notices a few dark gaps in the Sun’s spectrum — and thinks they are just the borders between colours.
1814
Joseph von Fraunhofer, a glass-maker, maps 574 dark lines and labels the strongest A to K. He also sees that stars such as Sirius have different patterns from the Sun.
1859
Gustav Kirchhoff and Robert Bunsen show that each element has its own lines, and that the Sun’s dark lines mean sodium, iron and more are in the Sun. Within two years they discover two new elements by their lines alone: caesium (“sky-blue”) and rubidium (“deep red”).
1864
William Huggins turns a spectroscope on the Cat’s Eye Nebula and sees bright lines, not a rainbow: it is glowing gas, not a swarm of stars.
1868
During an eclipse Pierre Janssen, and soon after Norman Lockyer, see a yellow line in the Sun that matches no known element. Lockyer names it helium, after the Greek for Sun. William Ramsay finally finds helium on Earth in 1895.
1901
Annie Jump Cannon puts the star classes into the order O B A F G K M, still used today.
1908
George Ellery Hale sees sunspot lines split in two: sunspots are giant magnets.
1912
Vesto Slipher measures the first speed of a galaxy: Andromeda is coming towards us at about 300 km/s. Most of the others he measures are rushing away.
1925
Cecilia Payne shows that stars are made mostly of hydrogen and helium.
1927
Ira Bowen solves the mystery of “nebulium”, a supposed new element glowing green in nebulae: it is ordinary oxygen, giving off light that is only possible in near-empty space.
1929
Edwin Hubble puts Slipher’s speeds together with distances: the farther a galaxy, the faster it moves away. The universe is expanding.
1963
Maarten Schmidt realises that the strange lines of 3C 273 are just hydrogen, stretched by 16%: it is a quasar, far beyond our galaxy.
1995
Michel Mayor and Didier Queloz see 51 Pegasi’s lines wobble by about 56 m/s every four days: the first planet found around a Sun-like star (Nobel Prize 2019).
2022
The James Webb Space Telescope finds carbon dioxide in the air of WASP-39 b, a planet 700 light-years away, by reading the starlight that passes through its atmosphere.
Star heights are computed on your device for the Science Centre Observatory. Sources: line wavelengths from the NIST Atomic Spectra Database (Kramida, Ralchenko, Reader & NIST ASD Team) and the classic solar line tables (Moore, Minnaert & Houtgast, 1966); hydrogen wavelengths computed from the Rydberg constant (CODATA), converted to air with the standard refractive index of air (Edlén). Black-body curves: Planck’s law with CODATA constants; star colours from the CIE 1931 colour-matching functions in the analytic form of Wyman, Sloan & Shirley (JCGT 2, 2013) and the sRGB standard; rainbow colours after D. Bruton. The Sun’s temperature: IAU 2015 nominal value. Star temperatures and classes: typical published values. Doppler examples: V. M. Slipher (1913); Mayor & Queloz, Nature 378, 355 (1995); M. Schmidt, Nature 197, 1040 (1963); spectrograph precision: Pepe et al., A&A 645, A96 (2021, ESPRESSO). Cecilia Payne’s thesis: Stellar Atmospheres (1925). Fraunhofer’s 574 lines: J. Fraunhofer (1817). Seestar S30 filter: ZWO (duo-band, 30 nm OIII and 20 nm Hα). Singapore street lights: Land Transport Authority, reported by Mothership (February 2024). WASP-39 b: JWST Transiting Exoplanet Community ERS Team, Nature 614, 649 (2023).
Learn more (opens external sites): NIST Atomic Spectra Database · NASA — Spectroscopy 101 · ESA/Webb — carbon dioxide on WASP-39 b.
Companion pages: where the elements came from · telescope filters · the Seestar · light pollution · the Sun.
About & credits ·