Visible sunlight is white. It is composed of seven colours of the spectrum (red, orange, yellow, green, blue, indigo, violet), each of which has a different wavelength. When light passes through a glass prism or through raindrops, these colours become visible due to the refraction of light. The strength of refraction depends on the wavelength. Violet light, which has a relatively short wavelength, is refracted more strongly than red light, with its longer wavelength.
Scattering
On its way to Earth, sunlight encounters an array of atoms, molecules, and other liquid and solid particles in the air (known as aerosols). As a result, some of the light is diverted from its straight path and scattered in all directions. In this way, direct sunlight turns into diffuse light.
Small particles – large particles
If we delve into the details of light scattering in the atmosphere, it gets a little more complicated. The way in which light is scattered depends on both the size of the particles involved and the frequency of the light.