Oscar Wilde in The Ballad of Reading Gaol recalls wistfully ". . . that little tent of blue Which prisoners call the sky". And to someone looking vertically upwards, surrounded by high walls, the part of the sky that is visible is indeed a deep shade of blue.
But have you noticed that its colour is not uniform? Near the horizon, looking away from the sun, the sky is as near to white as makes no difference.
Light, as we know, is a wave motion. And if you watch waves moving along the surface of a body of water, you will notice that obstacles interfere with them. An obstruction of an appropriate size - a rock, for instance - disrupts the original wave train, and sends other wavelets off in all directions. Light waves are affected in the same way by the tiny molecules of our atmosphere; the process is called scattering.
Now light acquires its colour from its wavelength. Blue light, for example, has a very short wavelength, while the wavelength of red light is relatively long; the "white" light from the sun is a mixture of all the colours of the spectrum.
As it happens, the molecules of air in our atmosphere are of such a size that they scatter the very short wavelengths of blue light much more efficiently than they do the longer ones of the other colours. A little of the red and orange is scattered, for example, but the proportion is small compared to the blue.
When you look at a part of the sky away from the sun, you see sunlight which was originally heading in a different direction, but which has been scattered towards you by the atmosphere. And since, by and large, only the very short blue waves are affected in this way, you see the scattered light - and therefore most of the sky - as blue.
But near the horizon, matters are more complex. At this oblique angle, the sunlight scattered in our direction approaches us almost horizontally through the air, and most of it must travel a much longer path than usual before it reaches us.
Because of this long distance, the scattered blue light is subject to further attenuation on its journey by the atmosphere; it is "re-scattered" before it reaches our eyes, and much of it is therefore extinguished. But the small amounts of orange and red light which were originally scattered in our direction are likely to survive this long journey with little further interference. In this way, the balanced proportions required to produce white light are almost restored.