It is also possible for a photon to be emitted from a ultracompact neutron star surface, orbit near the photon sphere, and then spiral back in again impacting the surface. These describe, in general all of the distinct cases of photon orbit near an ultracompact neutron star. All shorter photon trajectories will lie on one of these paths. In this case the photon does not reach or cross the photon sphere. Here its distance decreases monotonically.
Photons climbing out of a gravitating object become less energetic.
Similarly, photons falling into a gravitational field become more energetic and exhibit a blueshifting. The effect a gravitational field would have on the actual perceived color of an object is more complex, however, as it depends on the distribution of photons emitted from the source at different energies relative to the sensitivity of the observer to measuring photons of different energies. Were this object put in a strong gravitational field and viewed from far away, so that the photons would be significantly redshifted, the strong ultra-violet emission could be shifted into violet emission and the object would look more blue, even though its light has been redshifted. This is an exceptional case, however, and redshifted objects may indeed appear more red.