The Color of The Sunset
Color in the form of pigment does not exist in the atmosphere. Instead, the color we see in the sky results from the scattering, refraction, and diffraction of sunlight by particles in the atmosphere, especially small particles such as air molecules. If there were no particles in the atmosphere, then sunlight would travel straight down to the Earth and the sky would be black.
Specifically, sunlight travels thought the solar system in straight, invisible waves (unless something sends it off in a different direction) and consists of a mixture of all colors in the visible portion of the electromagnetic spectrum. Furthermore, each color in this spectrum is associated with a different wavelength: red and orange have the longest wavelengths--while blue, indigo, and violet have the shortest (i.e., 0.47 um for violet to 0.64 um for red). Thus, when sunlight first enters the Earth's atmosphere, air molecules are typically the first to scatter the colors in sunlight--one by one, beginning at the violet end of the spectrum.
Specifically, when the sun is high in the sky (and there is a relatively short pathway to the Earth), violet, indigo, blue, and a little green are scattered, producing a blue sky. However, when the sun is low in the sky (i.e., sunrise or sunset), its path through the atmosphere is longer and yellow, orange, and red colors are scattered near the ground. Thus, as a general rule, the farther light travels through the atmosphere, the redder it becomes. The longer trip means more and more light at the blue end of the spectrum is scattered. This leaves red, yellow, and orange light to reach our eyes or reflect off clouds. This notion is perhaps best illustrated by example: a beam of sunlight that at a given moment produces a red sunset over the Appalachians is at the same time contributing to the deep blue of a late afternoon sky over the Rockies.
NOAA National Oceanic and Atmospheric Administration