Skip to content
Dark Matter

Star colours

A star's temperature is its colour. Guess the stars, then make a palette from them.

5,770 K · peak 502 nm · #fff1ea

visible100 nm300 nm1000 nm3000 nmλmax 502 nm

How hot is this star?

Move the temperature until your star matches its colour, then guess.

Your palette

  • #ffb96e3,000 K
  • #fff1ea5,772 K
  • #cedaff9,940 K
:root {
  --star-3000K: #ffb96e;
  --star-5772K: #fff1ea;
  --star-9940K: #cedaff;
}

Ask Claude

Answered by Claude Haiku 5.5, from Anthropic. What you write is sent to Anthropic to answer; we don't keep it.

What's happening

An ideal hot body glows with a spectrum set only by its temperature (Planck's law), peaking at a wavelength inversely proportional to it (Wien's law), and stars come close to it. Cool stars like Betelgeuse peak in the infrared and look orange; hot ones like Rigel, in the ultraviolet, and look blue-white. The colours here are computed from the spectrum, through the CIE colour-matching functions, into your screen's sRGB.

B(λ, T) = 2hc² / λ⁵ · 1 / (e^(hc/λkT) − 1) · λ_max = b / T

How to play

Move the temperature and watch the spectrum and the colour. The game: guess how hot each real star is from its colour alone. Then pick up to six temperatures and copy them as a palette of design tokens.

How it's made

Colour science done properly: integrating Planck's spectrum against the CIE 1931 colour-matching functions, then the sRGB transform. The palette comes out as CSS variables, the way we hand design systems to developers.