In physics, light loses energy when it moves away from a massive body such as a star or a black hole; this effect reveals itself as a gravitational redshift in the frequency of the light, and is observable as a shift of spectral lines towards the longer, or "red," end of the spectrum. Gravitational redshift is sometimes known as the Einstein effect, although that is not the only meaning applied to that term.