In astronomy, the term for light shifting toward longer wavelengths is redshift.
Redshift means that electromagnetic radiation is observed at a longer wavelength and a lower frequency than when it was emitted. Astronomers detect it by comparing familiar spectral lines—such as hydrogen lines—from stars or galaxies with the same lines measured in laboratories on Earth.
The shift can have several causes. A Doppler redshift occurs when a source moves away from the observer. A gravitational redshift occurs when light climbs out of a strong gravitational field. On the largest scales, cosmological redshift results from the expansion of space stretching light during its journey across the universe.
A common mix-up is confusing redshift with reddening. Dust or scattering can make an object look redder without moving its spectral lines to longer wavelengths. The opposite of redshift is blueshift, in which wavelength decreases and frequency increases. Astronomers use redshift, commonly represented by z, to study cosmic expansion, galaxy motions, and the history of the early universe.