Here's why:
* Doppler Effect: This phenomenon describes the change in frequency of a wave (like light) as the source of the wave and the observer move relative to each other. When the source moves towards the observer, the waves are compressed, resulting in a higher frequency.
* Light and Frequency: The frequency of light determines its color. Higher frequency light appears bluer, while lower frequency light appears redder.
So, when a light source moves towards you, the light waves are compressed, increasing their frequency and making the light appear bluer. This is called blueshift. The opposite happens when the light source moves away from you (redshift).