Here's how it works:
* Red Shift: When a star moves away from us, the light waves it emits are stretched out, causing them to shift towards the red end of the electromagnetic spectrum. This is known as redshift.
* Blue Shift: Conversely, when a star moves towards us, the light waves are compressed, causing them to shift towards the blue end of the spectrum. This is known as blueshift.
Therefore, while a star's true color may be somewhere in the middle of the spectrum, we observe it as redder if it's moving away from us. This phenomenon is a key tool for astronomers to study the movement of celestial objects.