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.
Latest Answers