What color is a star?
#fff1ea

Clearly visible. Its peak (502 nm) is visible light.

As seen by a dark-adapted eye.

Color model
Brightness
Compare

Spectrum

Spectral radiance, W·m⁻²·sr⁻¹·nm⁻¹. The rainbow band is the light you can see.

Planck curveVisible lightx̄ ȳ z̄ eye response

Where it sits on the color map

Every blackbody sits on the orange curve, which never reaches green or purple.

Where it sits among the stars

Stars by temperature and power. Tap one to load it.

Peak wavelength
502 nm
UV · visible · IR
10%46%44%
Surface luminance
1.84×10⁹ cd/m²
Power per m²
6.29×10⁷ W

How the color was computed

Every step, with live numbers.

CIE 1931

Weight the visible spectrum by how human eyes respond, then convert to screen color.

  1. Weight the spectrum by x̄, ȳ, z̄ and add up 380–780 nm
    X = 2.62×10⁶, Y = 2.70×10⁶, Z = 2.71×10⁶
  2. Luminance = 683 lm/W × Y
    1.84×10⁹ cd/m²
  3. Chromaticity: x = X/(X+Y+Z), y = Y/(X+Y+Z)
    x = 0.3266, y = 0.3359
  4. Convert to linear sRGB with the standard matrix
    1.113, 0.975, 0.913
  5. Apply the sRGB gamma curve
    #fff1ea
  6. Apply the brightness setting
    #fff1ea

Stars and other hot things

Tap one to load it. Star temperatures are effective temperatures, and lamps are rated by the blackbody color they match. Few of these are perfect blackbodies.

Stars18

Brown dwarfs2

Everyday light12

Cosmic2

Orion, in true color

Its seven brightest stars where they sit in the sky, in the color model and brightness chosen above. A dot's area shows how much of its light reaches us. Tap a star to load it.

Betelgeuse, at about 3,600 K, is the only cool one. The other six run from 12,000 to 31,000 K, which is why on a dark night one shoulder looks orange and the rest of Orion white with a touch of blue.

Questions

The basics

What am I looking at?

Everything with a temperature glows. This page takes one number, a temperature, and shows the light an ideal glowing object (a blackbody) gives off: how much of each wavelength (the spectrum), and what color and brightness that mix of light looks like to a human eye (the star).

Stars are close enough to blackbodies that this is a good way to understand why Betelgeuse looks orange and Rigel looks blue-white.

What is a blackbody, and are stars really one?

A blackbody absorbs every bit of light that hits it and re-emits energy purely because of its temperature. Its spectrum depends on temperature and nothing else.

Real stars come close but not all the way: their outer layers absorb some wavelengths (the dark lines in a stellar spectrum), and the light comes from a range of depths at different temperatures. A star's "effective temperature" is the temperature of a blackbody that would give off the same total power per square meter, which is why the comparison works so well. The Real stars color model shows what those differences do to the color.

What is the cosmic microwave background?

The oldest light there is. For its first 380,000 years or so, the universe was a hot plasma that light couldn't cross. When it had cooled to about 3,000 K, electrons and nuclei joined into neutral atoms (recombination), the universe turned transparent, and the light it was glowing with went free.

That light has been traveling ever since, and the expansion of the universe has stretched its wavelengths by a factor of about 1,100. A blackbody stretched that way stays a blackbody, only colder: 3,000 K divided by 1,100 is 2.7 K. Today it peaks near 1 mm, in microwaves, and arrives from every direction in the sky. It's the most perfect blackbody ever measured; its temperature, 2.72548 ± 0.00057 K, is from Fixsen (2009).

It's colder than the slider goes, so pick it from the list of stars and other objects, next to "When the universe turned transparent", the same light as it set out.

What do the letters O, B, A, F, G, K, M, L, T and Y mean?

They're spectral classes. Around 1900, astronomers at Harvard sorted hundreds of thousands of stars by the pattern of dark lines in their spectra. The letters were first handed out alphabetically, then Annie Jump Cannon reordered them into a smooth sequence that later turned out to be a temperature sequence, which is why they're out of order. Generations of students have remembered it as "Oh Be A Fine Girl/Guy, Kiss Me".

L and T were added in 1999 and Y in 2011, for the brown dwarfs that infrared surveys started finding. Each class is split into tenths (the Sun is a G2 star), and a Roman numeral gives the size: V for dwarfs like the Sun, III for giants, I for supergiants. The temperature ranges below are approximate and apply to dwarfs.

YThe coldest brown dwarfs below 500 K
Some are about as warm as a summer day. Found only by infrared telescopes. Examples: WISE 0855−0714.
TBrown dwarfs 500–1,300 K
Not massive enough to fuse hydrogen. Methane in their atmospheres. Examples: Gliese 229 B.
LThe smallest stars and brown dwarfs 1,300–2,400 K
Dusty atmospheres. They glow a dull deep red and are brightest in the infrared. Examples: Luhman 16 A.
MRed dwarfs and red giants 2,400–3,700 K
The most common stars: about three in four of our stellar neighbors are M dwarfs. Examples: Proxima Centauri, Betelgeuse, Antares.
KOrange stars 3,700–5,200 K
Cooler and longer-lived than the Sun. Many bright giants are K stars. Examples: Arcturus, Pollux, Alpha Centauri B.
GSun-like stars 5,200–6,000 K
Our Sun is a G2 star. Close to white seen from space. Examples: The Sun, Alpha Centauri A, Capella.
FYellow-white stars 6,000–7,500 K
A little hotter and bigger than the Sun. Examples: Procyon A, Polaris.
AWhite stars 7,500–10,000 K
Their spectra have the strongest hydrogen lines of any class. Examples: Sirius A, Vega, Altair, Deneb.
BBlue-white stars 10,000–30,000 K
Very luminous and short-lived. Many of the bright stars in winter constellations. Examples: Rigel, Spica.
OBlue stars above 30,000 K
The hottest, most massive and rarest stars. They burn out in a few million years. Examples: Zeta Puppis, the stars of Orion's Belt (Alnitak, Mintaka).

Tap a letter under the slider to jump to that class, or tap the class badge next to the temperature for a summary.

Why kelvin, and why not "degrees Kelvin"?

Kelvin starts at absolute zero, so it ties directly to physics: double the kelvin and every atom has twice the average thermal energy. 0 °C is 273.15 K, room temperature is about 295 K, and you are about 310 K.

Since 1967 the unit has just been "kelvin" (symbol K), with no "degrees".

How do I use it?

Drag the slider, tap a class letter or mark under it, tap one of the stars, or click the big temperature and type one in: kelvin ("5772"), Celsius ("1200 °C"), Fahrenheit ("2000 F"), or a name such as "Vega", "candle" or "bulb". Below 100 K you can give up to three decimals, like 2.725. The slider gives most of its length to 2,400–12,000 K (M through late B stars), where colors change the most, and squeezes the coldest temperatures and the hottest stars into its ends. The URL updates as you go, so you can share any temperature.

Color model picks how the color is worked out. Brightness picks whether to show just the hue or how bright it would really look. Compare shows all three models at once.

Is there a game?

Yes: How hot is it? shows real stars, lamps and lava in their true colors, ten rounds at a time. Guess each one's temperature on the slider, or pick the hotter of two. Your best score stays on your device, and you can share a result as a challenge.

The color models

What's the difference between Simple, CIE 1931 and Real stars?

Simple is the original v1 method. It adds up the light in three bands (red 620–680 nm, green 500–550 nm, blue 430–480 nm) and uses those three totals directly as red, green and blue. It's easy to follow, but it ignores how your eye responds, skips the gaps between bands, and has no gamma correction, so cool objects come out pure red and hot ones too blue.

CIE 1931 is standard colorimetry. It weights the whole visible spectrum of a perfect blackbody by three measured curves describing average human vision (the color matching functions), turns the result into a point in a standard color space, and converts that into the sRGB color your screen understands.

Real stars uses colors that Harre & Heller (2021) computed from detailed model spectra of real main-sequence stars, absorption lines and all, instead of a perfect blackbody. It covers 2,300–55,000 K (spectral types M9.5 V to O1 V). Outside that range there are no stars to model, so the page falls back to CIE 1931.

Where does the Real stars data come from?

From Table 5 of "Digital color codes of stars" by J.-V. Harre and R. Heller (Astronomische Nachrichten, 2021). They ran PHOENIX model atmospheres (up to 15,000 K) and TLUSTY models (hotter stars) through the human color matching functions and published the resulting colors for 105 main-sequence temperatures. This page interpolates between those rows.

One correction is applied. The paper's hex codes come straight from linear values, without the sRGB gamma step every screen expects, so they look more saturated than intended. A 2026 study of white dwarf colors by Hollands, Gänsicke, Tremblay and Koester pointed this out. This page applies the gamma step, and the "How the color was computed" panel shows both versions.

Do real stars really look different from blackbodies?

A little, and researchers disagree about how much. Harre & Heller (2021) concluded the differences are substantial: the coolest red dwarfs look orange rather than red, and F, A, B and O stars look somewhat bluer than blackbodies at the same temperature.

Hollands et al. (2026, RAS Techniques and Instruments) found that for main-sequence stars, absorption in the atmosphere causes only minor shifts once the light is filtered through the broad sensitivity of human vision. Part of the gap between the studies is method: Harre & Heller used the newer CIE 2006 color matching functions and skipped the gamma step, while this page's blackbody model uses CIE 1931. Turn on Compare to judge for yourself.

Why do cold objects go black instead of deep red?

Because almost none of their light is visible. At 300 K (room temperature, or you) the peak is near 10 µm in the infrared, and the visible light coming off it is about thirty orders of magnitude fainter than the Sun's.

Heated objects start to faintly glow at about 800 K, the Draper point. At first the glow looks grey rather than red, because at that brightness only your rods respond, and rods don't see color. Around 1,000 K a dull red appears, then orange, then yellowish white.

Rods also barely respond to deep red, so a dull red glow looks fainter to them than a light meter (which measures like your cones) would say. The Your eye brightness setting models this: in the rod-only range it uses scotopic (rod) luminance, from the CIE 1951 V′(λ) curve, instead of the usual photopic luminance. The thresholds are approximate, because real vision depends on adaptation, viewing angle and the individual.

Why are there no green stars?

A blackbody's spectrum is a broad hump, never a narrow spike. Even when the peak lands in the green, as it does for the Sun, there's nearly as much red and blue light alongside it, and the mix looks white. On the color map you can see the Planckian locus curve right past the green region without touching it.

You can occasionally see green from a star because of Earth's atmosphere. The best-known case is the green flash at sunset, but the light leaving the Sun isn't green.

Why are there no purple stars either?

For the same reason. As a blackbody gets hotter, the visible part of its spectrum tilts toward blue but never piles up at the violet end. The color heads toward a pale sky blue and stops there.

Why does the color stop changing above about 20,000 K?

Once the peak is far into the ultraviolet, the visible part of the spectrum lies on the long-wavelength tail of the curve. That tail keeps the same shape (proportional to T/λ⁴) and only gets taller. Every hot star converges on the same pale blue, around x = 0.240, y = 0.235 on the color map.

Isn't the Sun yellow?

Out in space, the Sun is very close to white, with a slight warm tint on this page. It looks yellow from the ground because the atmosphere scatters some of its blue light across the sky, and orange-red at sunset when its light passes through much more air.

"White" on a screen is defined by the sRGB standard as the D65 white point, which is close to a 6,500 K blackbody. Anything cooler than that looks slightly warm here, and anything hotter looks slightly blue.

Why is a 2,700 K bulb called "warm" when it's colder?

Because the names describe how the light feels, not the physics. Orange-tinted light like candlelight and firelight feels cozy, so it's called warm; bluish light like an overcast sky feels cool. For a blackbody it's the other way round: the hotter it is, the bluer it glows, so "cool white" light matches a hotter blackbody than "warm white".

An LED's rating is a correlated color temperature: the temperature of the blackbody whose color it matches most closely. The LED itself barely gets warm. An old incandescent bulb's filament really is at about 2,700 K.

Why do most stars look white at night?

Stars are tiny points of light, and most are too faint to wake up the cones that see color. Only the brightest show their color clearly: orange Betelgeuse and Arcturus, red Antares, blue-white Rigel and Vega. Binoculars help, because they collect more light.

Is the color on my screen exactly right?

Close, but not exact. Screens can only show colors inside their gamut, and the deep reds of objects below about 1,900 K lie outside standard sRGB. This page pulls those in by mixing in a little white, so they look slightly paler than reality. Your display's calibration and brightness, and the room you're in, matter too.

Most recent phones, tablets and laptops have wide-gamut (Display P3) screens. On those, the page uses P3 and shows the true hue down to about 800 K, so cool glows look deeper red; only colder ones still get a little white.

The chart

What do the chart's units mean?

Spectral radiance is how much power leaves the surface, per square meter, per steradian (a unit of viewing direction), per nanometer of wavelength: W·m⁻²·sr⁻¹·nm⁻¹. v1 used "per meter of wavelength", which gives the same curve but numbers a billion times larger. Per Hz divides by hertz of frequency instead: W·m⁻²·sr⁻¹·Hz⁻¹. The UV · visible · IR bar splits the total power at 380 and 780 nm.

Why does the peak move when I change the temperature?

That's Wien's displacement law: the peak wavelength is inversely proportional to temperature.

λmax=bT,b≈2.898×10−3 m·K

The Sun peaks near 502 nm. A 3,000 K red dwarf peaks near 966 nm, in the infrared, which is why it puts out so little visible light.

Why does the peak move when I switch to Per Hz?

Per nm counts the power in each nanometer of wavelength, Per Hz in each hertz of frequency. A nanometer of red light spans fewer hertz than a nanometer of blue, so the same light, sliced differently, peaks somewhere else. Per Hz follows Wien's frequency law, νmax ≈ 5.879 × 10¹⁰ Hz/K × T: the Sun peaks near 502 nm per nm but near 880 nm per Hz. Neither peak sets the color, which comes from the whole visible band.

What are the lines on the chart?

The atoms and molecules in a star's atmosphere absorb light at their own wavelengths. Lines marks the strongest for the current class: hydrogen (Hα, Hβ, Hγ) in B, A and F stars, calcium (Ca II H and K) in F, G and K, sodium (Na D) in G, K and M, and titanium oxide in M. The positions are real (from the NIST Atomic Spectra Database), but the drawing is illustrative: the curve is still a pure blackbody.

Why is the horizontal axis logarithmic?

Across the temperatures on this page the peak moves from about 30 nm to 30 µm, a factor of a thousand. A log axis keeps both the peak and the visible band on screen at every temperature. Switch the vertical axis to Log to see how faint the visible part is for cool objects.

The math

What is Planck's law?
Bλ(T)=2hc2λ51ehc/(λkBT)−1

h is Planck's constant, c is the speed of light, kB is Boltzmann's constant, λ is the wavelength in meters and T is the temperature in kelvin. Since 2019 all three constants are exact by definition:

h = 6.62607015 × 10⁻³⁴ J·s · c = 299,792,458 m/s · kB = 1.380649 × 10⁻²³ J/K

How is the CIE 1931 color calculated?

Weight the spectrum by each of the three color matching functions and add it up over the visible range:

X=∫Bλ(T)x‾(λ)dλ

and the same for Y with ȳ and Z with z̄. Y is the brightness (times 683 lm/W it's luminance in cd/m²). X and Y divided by X+Y+Z give the chromaticity (x, y): the color with brightness removed. A standard 3×3 matrix turns XYZ into linear sRGB, colors outside the screen's gamut are pulled in by adding white, and the sRGB gamma curve is applied last.

The color matching functions and the rod (scotopic) curve V′(λ) are official data from the International Commission on Illumination (CIE): CIE 1931 colour-matching functions and CIE spectral luminous efficiency for scotopic vision, both from CIE 018:2019 and used under CC BY-SA 4.0. This page uses every fifth row (5 nm steps), with the 1931 values rounded to six decimals.

How do I know the math is right?

The code is checked by automated tests against published reference values. The blackbody colors match the published Planckian locus to four decimal places at 1,000 K, 2,856 K (CIE Illuminant A), 5,000 K and 10,000 K. Integrating Planck's law over every wavelength, or every frequency, reproduces the Stefan–Boltzmann law, the Per Hz peak matches Wien's frequency law, and the UV · visible · IR split matches published blackbody radiation tables. Both CIE tables are checked against CIE's official data files, and rod (scotopic) luminance reproduces published scotopic-to-photopic ratios, such as 1.41 for an incandescent lamp. The Real stars table is checked row by row against the paper's own hex codes.

How hot is too hot, or too cold, for this to work?

Planck's law holds at any temperature. The limits are practical: below about 600 K there's no visible light to speak of, and above about 50,000 K the color stops changing. The slider covers 100 K to 100,000 K, and you can type anything up to 1,000,000 K. The cosmic microwave background, at 2.7 K, is in the list of objects.

I think something's wrong. Where do I report it?

About

Who made this?

David, a software engineer who dabbles in astronomy. The source is on GitHub, and the original version is still up.

Can I embed this in my own page?

Yes. Paste this where you want it; it fits frames from 300 by 300 pixels up:

<iframe src="https://space-charts.vercel.app/embed/?t=5772" width="400" height="400" style="border:0" title="What color is a star?" loading="lazy"></iframe>

It shows the star, the slider and the spectrum, with a link back here. It takes the same settings as this page's address (t, model, light, compare), so set it up here and copy them from the address bar.

Why is it so fast?

The page has no framework, no web fonts and no chart library. Everything ships in a single file, the chart is drawn directly, the equations are native browser math, and the numbers are computed on your device in well under a millisecond.

Keyboard shortcuts

← →
Previous or next class
Shift ← →
Fine step
O … Y
Jump to class O, B, A, F, G, K, M, L, T or Y (B and M with Shift)
S
The Sun
M B
Next color model, brightness
C
Compare: show all three
P
Heat it up: play or stop
?
This list