Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 37 · The Sun and Stars

Star Colors, Temperature, and the H-R Diagram

Learn why stars have different colors, how Wien's law and the Stefan-Boltzmann law link temperature, size and luminosity, and how to read the H-R diagram.

Look closely at the stars and you notice colors: Betelgeuse glows orange-red, Sirius shines blue-white, and the Sun is yellow-white. These colors are not decoration. They tell us the surface temperature of each star, and temperature, together with luminosity, tells us what kind of star it is.

In this lesson you will use two physical laws to connect color, temperature, size, and power, then learn the most famous chart in astronomy, the Hertzsprung-Russell (H-R) diagram.

Hot things glow

Heat a piece of metal: it glows dull red, then orange, then yellow-white. A very hot object emits light across many wavelengths, and the peak shifts toward shorter wavelengths (bluer) as it gets hotter. A star approximates a perfect glowing object called a blackbody. Two laws describe it.

Wien's displacement law

The wavelength where a blackbody radiates most strongly is

λ_max = b / T

where T is the temperature in kelvin and b = 2.897772 × 10^-3 m·K. Doubling the temperature halves the peak wavelength.

Python Peak wavelength of stars

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The Sun peaks near 500 nm (green-blue), yet looks white-yellow because it emits strongly at all visible wavelengths. The coolest stars peak in the infrared, and the hottest peak in ultraviolet, outside what our eyes can see. A person's body radiates in the infrared, which is why thermal cameras work.

Stefan-Boltzmann law

The total power radiated by a spherical star with radius R and surface temperature T is

L = 4π R² σ T⁴

where σ = 5.670374 × 10^-8 W/m²/K⁴. Temperature enters to the fourth power, so a small temperature increase raises the luminosity sharply: doubling T makes a star 16 times more luminous at the same size. Radius matters as a square.

In solar units this becomes a handy formula:

L / L☉ = (R / R☉)² × (T / 5772 K)⁴

Python Finding a star's radius

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A cool star shining 10,000 times brighter than the Sun must be huge (about 270 solar radii), because each square meter of its surface radiates little. A hot, dim star must be tiny: about 0.009 solar radii, similar to Earth's size. This is how astronomers discovered white dwarfs.

Spectral classes

Stars are sorted by temperature into classes O, B, A, F, G, K, M, from hottest to coolest. A common memory aid is "Oh Be A Fine Girl (or Guy), Kiss Me." Each class is divided into subclasses 0 to 9, so the Sun is a G2 star.

Class Temperature (K, approx.) Color
O above 30,000 Blue
B 10,000 to 30,000 Blue-white
A 7,500 to 10,000 White
F 6,000 to 7,500 Yellow-white
G 5,200 to 6,000 Yellow
K 3,700 to 5,200 Orange
M 2,400 to 3,700 Red

Color tells temperature

Blue Hottest stars
White Very hot
Yellow Like the Sun
Red Coolest stars
1 / 2

The Hertzsprung-Russell diagram

In the early 1900s, Ejnar Hertzsprung and Henry Norris Russell independently plotted stars by luminosity (vertical axis) against temperature or spectral class (horizontal axis). By tradition the temperature axis runs backward: hot on the left, cool on the right. The stars did not scatter randomly. They fell into groups:

  • Main sequence: a diagonal band from hot and luminous (upper left) to cool and dim (lower right). Stars fusing hydrogen in their cores, including the Sun, live here for most of their lives.
  • Giants and supergiants: upper right. Cool but very luminous, hence enormous.
  • White dwarfs: lower left. Hot but dim, hence tiny.

Where a star sits tells us its mass (on the main sequence), size, and stage of life.

Python A rough H-R diagram

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You can see the Sun, Sirius A, and Proxima Centauri along the main sequence, giants and supergiants (Arcturus, Betelgeuse, Rigel) at the top, and the white dwarf Sirius B at the lower left. The values are rounded, and some, such as Betelgeuse's luminosity, are uncertain.

The H-R diagram is like a "family album" for stars. A single snapshot shows stars of different ages and masses together. The lessons on star life cycles explain how a star moves around the diagram as it ages.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which spectral class has the hottest stars?

    The sequence O, B, A, F, G, K, M runs from hottest to coolest.
  2. 2. According to Wien's law, what happens to the peak wavelength when a star's temperature increases?

    λ_max = b / T, so hotter means a shorter peak wavelength (bluer).
  3. 3. A star has the same size as the Sun but twice the surface temperature. How many times more luminous is it?

    L is proportional to T⁴, and 2⁴ = 16.
  4. 4. A star that is cool but very luminous must be

    Cool surface means little power per square meter, so a high total power requires a huge surface area.

Summary

  • A star's color depends on its surface temperature; blue is hot, red is cool.
  • Wien's law: λ_max = b / T. Stefan-Boltzmann law: L = 4π R² σ T⁴.
  • Spectral classes O, B, A, F, G, K, M run from hottest to coolest; the Sun is G2.
  • The H-R diagram plots luminosity against temperature and reveals the main sequence, giants, supergiants, and white dwarfs.
  • From luminosity and temperature we can calculate a star's radius.

Next: back to the Astronomy track