Initializing, please wait a moment

Slide through the OBAFGKM temperature sequence (or pick a letter class) to watch a 3D star change color and size, and see which absorption-line family - ionized helium, hydrogen Balmer lines, or ionized calcium and metal lines - dominates its spectrum at that temperature. Toggle luminosity class to compare a dwarf, a giant, and a supergiant at the same temperature.

Preparing the 3D scene...

The seven buttons jump straight to a representative temperature for each letter class; the slider scrubs continuously between them on a temperature scale, not a linear one, so the hottest and coolest classes both stay reachable. The three bars below the star track how strongly each line family would show up in a real spectrum at the current temperature.

Drag to orbit and scroll or pinch to zoom. Luminosity class changes the star's size only - it is a simplified, order-of-magnitude teaching scale, not a per-star radius model.

Stellar Spectral Classification 3D Explorer


Slide through the OBAFGKM temperature sequence and watch a 3D star change color and size while three bars show which absorption-line family - ionized helium, hydrogen Balmer lines, or ionized calcium and metal lines - actually dominates a real spectrum at that temperature, from hot blue O stars to cool red M dwarfs.

Pick a letter class button to jump straight to a representative temperature, or drag the slider to scrub continuously between them. A separate set of buttons toggles the Morgan-Keenan luminosity class - main-sequence dwarf, giant, or supergiant - so you can compare how differently a K-type giant and a K-type dwarf are sized at the very same temperature.

  • Seven OBAFGKM class buttons (O, B, A, F, G, K, M) jump to each class's representative temperature, from about 32,000 K down to about 3,300 K
  • A continuous temperature slider scrubs the star's color and size across the full sequence on a non-linear scale, so both ends stay reachable
  • Three line-strength bars - He II, Balmer hydrogen, and Ca II plus metals - rise and fall to show which absorption-line family dominates at the current temperature
  • Luminosity class toggle (V dwarf, III giant, I supergiant) resizes the star using real giant and supergiant examples as a teaching scale
  • "Pin the Sun (G2V)" jumps straight to the Sun's real IAU-nominal effective temperature of 5,772 K
  • "Play through OBAFGKM" auto-scrubs the sequence hands-free; your last temperature and luminosity choice are remembered on your device
  • Drag to orbit, scroll or pinch to zoom; runs fully in the browser with the vendored three.js engine - no account, no upload
ClassApprox. temperatureColorWhat stands out in the spectrum
O30,000-50,000 KBlue-whiteIonized helium (He II) lines - only hot enough here
B10,000-30,000 KBlue-whiteNeutral helium lines strong; Balmer lines still building
A7,500-10,000 KWhiteHydrogen Balmer lines at their strongest of any class
F6,000-7,500 KYellow-whiteBalmer lines fading; calcium and metal lines building
G (Sun)5,300-6,000 KYellowCa II H and K lines prominent; Sun is G2V at 5,772 K
K3,900-5,300 KOrangeMetal lines and early molecular bands strengthen
Mbelow 3,900 KRedMolecular bands (e.g. titanium oxide) dominate

Why the Balmer lines peak at A, not at the hottest stars

Hydrogen Balmer absorption lines are commonly assumed to be strongest in the hottest stars, but the opposite is closer to true. Balmer absorption depends on hydrogen atoms sitting in a specific excited state (n=2) that a photon can then knock further; that population peaks around 10,000 K, which is why A-type stars carry the classic strong-Balmer-line fingerprint. Go hotter into the O and B classes and hydrogen is mostly ionized, so the lines weaken again; go cooler into F, G, K, and M and too few atoms reach that excited state, so calcium and metal lines take over instead. The three bars on this page track that real, non-monotonic trend directly.

Same temperature, very different star: luminosity class

Two stars can share a spectral class and temperature yet differ enormously in size - that is what the Morgan-Keenan luminosity class (I through V) captures. Aldebaran, a real K5 III giant, is about 44 times the Sun's radius; Betelgeuse, a real M1-2 Ia supergiant, is roughly 640 to 764 times the Sun's radius by recent estimates - both far larger than a same-temperature main-sequence dwarf like the Sun itself. This page teaches three of the five classes (I, III, V) as a deliberate simplification, and says so in the facts panel rather than implying it covers all five.

For the separate question of how a star's color relates to its temperature through the continuous Planck curve rather than line-by-line absorption, see the Black-Body Radiation 3D Explorer. For how astronomers plot whole populations of stars by temperature and luminosity at once, see the HR Diagram 3D Explorer - this page instead teaches the line-fingerprint classification system for one star at a time.

Everything renders on your device with WebGL. The 3D engine loads once (about 0.7 MB) and is cached, and nothing about your visit is sent to a server.

This is an educational approximation, not a stellar-atmosphere simulation: the three line-strength bars are a teaching proxy for real, documented absorption-line trends, not a rendered spectrum, and the luminosity-class sizes are an order-of-magnitude teaching scale anchored to real published examples rather than a per-star radius model. The temperature ranges, the Sun's 5,772 K figure, and the Aldebaran and Betelgeuse radius figures are real, published values.

← Back to Space 3D

Related tools:

Tags: #space-3d

Loading reviews...

Frequently Asked Questions

What does OBAFGKM mean?

It is the order of the seven main spectral classes in the Morgan-Keenan (Yerkes) classification system, from hottest to coolest: O, B, A, F, G, K, M. Each class is further split into ten numbered subclasses (for example the Sun is G2), but this page teaches the seven main letters.

Why do the Balmer line bars peak at class A instead of the hottest stars?

Hydrogen's visible Balmer absorption comes from atoms sitting in a specific excited energy level whose population peaks near 10,000 K - roughly the A-type range. Hotter O and B stars ionize most of their hydrogen, and cooler F-M stars have too few atoms reaching that level, so the Balmer lines weaken on both sides of A.

What is the Sun's real spectral type?

G2V - a G-type main-sequence star with an effective temperature of 5,772 K, the IAU's 2015 nominal figure. Press "Pin the Sun (G2V)" to jump the scene straight to it.

Does the luminosity toggle show every real giant and supergiant size?

No. It shows an order-of-magnitude teaching scale anchored to two real, published examples - Aldebaran (K5 III giant, about 44 solar radii) and Betelgeuse (M1-2 Ia supergiant, roughly 640 to 764 solar radii) - not a precise radius for every possible star at every class.

Are the three line-strength bars a real rendered spectrum?

No. They are a teaching proxy for real, documented line-strength trends - ionized helium, hydrogen Balmer lines, and ionized calcium plus metal lines - not a pixel-accurate spectrograph render. The trend each bar follows is real; the bar itself is a simplified visualization.

Is this the same as the Black-Body Radiation explorer?

No. The Black-Body Radiation 3D Explorer teaches the continuous color-temperature relationship (the Wien peak and Planck curve) with no luminosity classes and no line spectrum. This page teaches the line-fingerprint classification system and the luminosity-class size differences instead.

Is this the same as the HR Diagram explorer?

No. The HR Diagram 3D Explorer plots many stars at once by temperature and luminosity to show population trends like the main sequence and the giant branch. This page follows one star at a time through the classification system that gives it its letter and Roman-numeral label.

Is this a full stellar-atmosphere simulator?

No. It is an educational approximation built from real, published temperature ranges, the Sun's real effective temperature, and real giant/supergiant radius examples. The line-strength bars and luminosity sizes are simplified teaching proxies, not a radiative-transfer or stellar-structure simulation.