In addition to refraction, light coming through the atmosphere (and most other media) suffers dispersion, which is a rainbow-like effect caused by different colors or wavelengths of light being refracted by different amounts. In general, shorter wavelengths (e.g., blue and violet) are refracted more, and longer wavelengths (e.g., orange and red) are refracted less, so the image of an object which suffers a high refraction and associated dispersion actually consists of a series of images, each of a different wavelength, slightly shifted relative to each other, with the shorter wavelength images at higher altitudes, and the longer wavelength images at lower altitudes. Atmospheric dispersion is usually very small, and requires telescopic observation; but careful examination of the images of the Sun and Moon, when very near the horizon, may reveal a bluer upper rim, and a redder lower rim.
An image of the Moon near the horizon, showing a greenish upper rim, and (if you look very closely) a reddish lower rim. The arc above the top limb of the Moon is produced by unusual atmospheric conditions not discussed here, while the overall reddish tone is caused by scattering of shorter wavelengths (extinction), which is proportional to the increase in refraction, so that the flatter the Moon appears, the redder it appears, as well. (Laurent Laveder, apod050826)
An image of Venus, showing chromatic dispersion. Such an extreme dispersion only occurs when objects are relatively low in the sky, but any object viewed at high magnification, particularly if less than about 30 degrees above the horizon, will have some color fringing, blue at the top and red at the bottom. The colors often appear reversed, because most telescopes invert the image seen through them; but in the example shown here, the telescope and eyepiece combination produced a "correct" relative position for the colors. (Ron Wayman, spaceweather.com, 01/04/06)