Answer: from the color of the light.
Step-by-step explanation:
1) Indeed, the Doppler effect states the the frequency of the light is perceived differently whether the source of light is approaching or it is moving away.
2) If the source of light is moving away, the observer will perceive a longer wave length, which is a lower frequency.
Since the lowest frequency of vsible light is red, it is said that the light is red shifted.
If the source of light is approaching, the observer will perceive a shorter wave length, which is a higher frequency.
In this case is is said that the light is blue shifted.