Rayleigh's theory was unique. He agreed with other scientists of the time that dust and other large particles in the atmosphere could scatter light, and that when this occurred, the spectral colors red and blue were revealed. Rayleigh also agreed that no light was absorbed by large particles, but he took this concept of scattering in the atmosphere one step further. Rayleigh concluded that as light traveled from the Sun to an observer, it encountered molecules, mostly of nitrogen and oxygen, in the atmosphere. Rayleigh then calculated a mathematical formula that demonstrated that, even in an atmosphere without smoke and dust, gas molecules like oxygen could redirect sunlight and scatter it in many directions.
Sunlight is a form of visible light that contains all of the colors.
When it is scattered, it is perceived by the human eye as having a specific color. When sunlight encounters gas molecules in the atmosphere, high frequency blue light is scattered out first. As the Sun begins to set, the sky at the horizon often appears to be red. Sunlight entering at the horizon level travels through more atmosphere than sunlight entering overhead. Most of the shorter wavelength light has been scattered out, allowing longer wavelengths of light to reach our eyes.