If stars moving away/towards Earth appear blue/red shifted, how do we know their colours are red/blue because they are moving, and not just that they are a red/blue coloured star that’s relatively stationary?


I copied the wording from a Quora post because all the answers were ELIhave a PHD in astrophysics.

In: 6

Each gas when it gets hot enough, emits light. The color of this light is very specific to that gas and will always be the same. Like sodium street lamps are always that yellow colour. If we know what colour it should be, because we know what gases are there, we can measure how much the colour has shifted.

In reality stars shine in different specific colours, that creates a pattern, that tells us of what elements the star is made of. And we can see how much the pattern has shifted.

Gaseous atoms produce light of *very* specific frequencies. E.g. hydrogen produces the [Balmer series](https://en.wikipedia.org/wiki/Balmer_series). If you look for that pattern, and see it — but shifted up or down in frequency — then you can say you’re looking at a cloud of hydrogen moving toward or away from you at a particular speed.

Okay, stars are made of different elements depending on their size and age. Each element of the periodic table emits, and absorbs light differently. (It has to do with the electron orbits, but that’s a bit complicated and not necessary to know for this question. )

Anyway, because each element absorbs light differently, they leave unique patterns. It’s like a barcode in the light spectrum. Each barcode pattern is located at precise points on the electromagnetic spectrum. I’m talking with nanometer precision.

Okay, so we know the exact pattern for every element, and we know the exact location in the spectrum for every element. Remember this.

Now, the shifting occurs when the universe itself is expanding. It’s pretty much all redshifted. An object would have to be traveling immensely fast towards us to blue shift.
As the universe expands it stretches the Lightwave out with it. So, the part that was orange is now red, yellow has become orange, etc.

BTW, this is oversimplified, the shifting is much more subtle, but the idea it conveys is correct.

Anyway, say we find the pattern for oxygen, which is green, in the yellow. How far into the yellow can tell us how far the star is. We know the light has shifted because the oxygen barcode is in the wrong place.

These barcodes are also how we know what elements are in stars and nebulae and such.

I think I got all the relevant information in here, ask about anything confusing, I’ll do me best.

You know how a prism splits up white light into a rainbow of individual colors? [This](https://www.shutterstock.com/image-vector/emission-spectrum-sodium-element-2025986870) is what it looks like when you take a pure element, sodium in this case (salt if you want to try it at home), and split up the light it gives off when really hot – it forms bands that make up a distinct pattern. Each element forms a distinct pattern. This is what the pattern for [hydrogen](https://en.wikipedia.org/wiki/Hydrogen_spectral_series#/media/File:Hydrogen_spectrum.svg) looks like.

Stars have a lot of hydrogen, so when you split up the light using in a spectrograph, you can look for that distinctive pattern (distinctive to astronomers, at any rate) in the spectrum of light from the star. If the pattern is shifted to the red then you know the star is going away. Shifted towards the blue and it’s coming at you. How much shift tells you how fast.

This technique can tell you more! When a star is spinning, one side may be going away and the other side coming towards you, and if your equipment is super sensitive, you can tell how fast the star is spinning!