Why does the sky appear blue?
The sky appears blue because sunlight is scattered by the gases in Earth's atmosphere, and shorter blue wavelengths are scattered much more than longer red ones. This scattered blue light reaches our eyes from all directions, making the whole sky look blue.
Sunlight is a mix of colors
Sunlight looks white, but it contains all the colors of the rainbow. Each color has a different wavelength. Red has the longest, and violet and blue have the shortest.
Rayleigh scattering
When sunlight enters the atmosphere, it hits tiny nitrogen and oxygen molecules. These molecules scatter short wavelengths much more strongly than long ones. This is called Rayleigh scattering, after the British physicist Lord Rayleigh, who explained it in the 1870s.
Why not violet?
Violet light is scattered even more than blue, but the Sun gives off less violet, some is absorbed high in the atmosphere, and our eyes are more sensitive to blue. So the sky looks blue to us.
Red sunsets
At sunrise and sunset, sunlight travels through much more air to reach us. Most blue light is scattered away before it arrives, leaving mainly red, orange and yellow light.
Other skies
On the Moon, which has no atmosphere, the sky is black even in daytime.
On Mars, fine dust makes the daytime sky look butterscotch, while sunsets there can appear bluish.
Clouds look white because their water droplets scatter all colors about equally.