The blue colour of the daytime sky results from the selective scattering of light rays. When the sunlight enters the Earth's atmosphere, the rays with the longest wavelengths (reds and yellows) travel most easily to the surface. The shorter wavelengths of the visible spectrum (blue) are scattered by the molecules of the atmosphere. This scattering only affects a small portion of the light from the Sun, which appears pale yellow in the blue sky. In space, the Sun appears white.
The sky appears its deepest blue when the air is dry and clean. Water vapour and dust scatter all colours of light, causing the blue to appear washed-out and pale.