The colors of the sunset result from a phenomenon called scattering. Molecules and small particles in the atmosphere change the direction of light rays, causing them to scatter. Scattering affects the color of light coming from the sky, but the details are determined by the wavelength of the light and the size of the particle. The short-wavelength blue and violet are scattered by molecules in the air much more than other colors of the spectrum. This is why blue and violet light reaches our eyes from all directions on a clear day. But because we can’t see violet very well, the sky appears blue. Scattering also explains the colors of the sunrise and sunset. Because the sun is low on the horizon, sunlight passes through more air at sunset and sunrise than during the day, when the sun is higher in the sky. More atmosphere means more molecules to scatter the violet and blue light away from your eyes. If the path is long enough, all of the blue and violet light scatters out of your line of sight. The other colors continue on their way to your eyes. This is why sunsets are often yellow, orange, and red.
These pictures were taken in Thailand and in Indonesia on the island of Bali.