
Albireo is the distinctive double star in the head of the constellation Cygnus. You can find it yourself if you look for the Summer Triangle amid the dusty trail of the Milky Way across the night sky.
The brighter, orange star of Albireo is a K3-class bright giant. That means it’s just a few thousand Kelvins (Celsius degrees plus 273) cooler than the sun. But it’s also larger—70 times the sun’s radius—and that makes it brighter than you would expect.
The blue star, on the other hand, is a B8-class dwarf. It has only about 3.5 times the sun’s radius, although it’s hotter by about 7422 Kelvins.
Neither star in Albireo is particularly unusual. There are doubtless millions, even billions, of other stars similar to each one. But Albireo certainly offers us the most striking contrast. Bright blue and red stars don’t often appear so close together.
But what exactly gives these stars their distinctive colors?
A high school astronomy teacher of mine would have you believe the orange star is moving away from us, and the blue star is moving towards us. That teacher was referring to the Doppler effect.
The Doppler effect has nothing to do with the colors of stars, but my teacher was right that it has everything to do with whether a star is moving towards or away from us.

The Doppler effect is based on the observation that light towards the red end of the spectrum (like what you see in a rainbow) has a longer wavelength than light towards the blue end of the spectrum.
What does that even mean? Well…exactly what it sounds like. Believe it or not, light doesn’t exist as straight rays. It exists as literal waves of energy, shaped a lot like ocean waves. The literal distance between crests of these waves is the wavelength.
Our eyes register the waves of energy in visible light as—you guessed it—visible light. We didn’t evolve to see the other types of radiation in the diagram above, but we feel infrared waves of energy as heat.
Different types of radiation differ only by their wavelength, and our definitions are arbitrary. The wavelengths of ultraviolet radiation lengthen gradually into those of visible light, until they reach a length our eyes can register. Then they lengthen gradually into those of infrared radiation.
When studying astronomy, it’s important to use a spectrograph to spread the white light (and other invisible radiation that comes with it) from stars into a spectrum like the one above.
Then we can also study how certain materials in stellar atmospheres block certain wavelengths, appearing as little black lines (or, more usefully, as sudden dips in the intensity of the radiation across the spectrum).

And this is what gives rise to the Doppler effect.
You can think of the wavelength of radiation as its “pitch;” for the same reason an ambulance siren’s pitch seems to change as its distance changes, the wavelength of radiation seems to change as a star moves towards or away from us.

But it doesn’t make the star actually look red or blue. What we actually see is a shift in the lines of the star’s spectrum, or in the dips of its wavelength vs. intensity graph.

As you might guess from the illustration above, spectral lines are redshifted, meaning they shift in the “red” direction, when a star moves away from us. They’re blueshifted, meaning, they shift in the “blue” direction, when a star moves toward us.
Why? There’s a better explanation of it in my post on the Doppler effect, but essentially, the wavelengths of the star’s radiation seem to be compressed as it moves toward us. The same amount of waves are there, but they’re squeezed into slightly less distance, making them seem shorter and bluer. The opposite works for redshift.
My point, however, is that the Doppler effect very much does not affect a star’s actual color. The two have nothing to do with one another.
So how do stars get their colors, then?
That’s thanks to their wavelength of maximum intensity.

Stars emit all wavelengths of radiation, from gamma rays to radio waves. But they don’t all emit the same amount of all the wavelengths. Basically, the wavelength they emit the most of is the one we see.
Let’s take a moment to consider what that means.
The graph you see here shows radiation curves for five different stars, all different temperatures. The 3000K one at the bottom is a red dwarf—its radiation actually peaks in the infrared, but of all its visible light, red wins out. So it appears red.
A hotter star—say, the 4000K one—will have a higher curve. It will emit more radiation altogether. But because shorter wavelengths carry more energy, it’s able to emit more of them…and its radiation will peak slightly further from the red end. It’s still a red dwarf, though.
Take a look at the 5000K star. Of all the examples on this graph, it’s the most similar to our sun. It has the right temperature and it peaks in the yellow. But also notice that, like the 4000K red dwarf, it follows the trend of hotter stars emitting more radiation overall.
The other two stars peak in the blue end of the spectrum, so they will appear blue.
These two might be “white dwarfs,” a particular brand of star that’s extremely hot but extremely small (and thus, extremely faint). Or they might be supergiants…or they might fall along the main sequence.
Without knowing their luminosities—how bright they are—it’s impossible to say. All we know is their temperatures.
Anyway, that’s the story behind the colors of stars. Soon enough, we’ll dive into binary systems—stars that, unlike our sun, orbit one another.