The blue color of the sky is a consequence of three factors:[17]
the blackbody spectrum of sunlight coming into the Earth’s atmosphere,
Rayleigh scattering of that light off oxygen and nitrogen molecules, and
the response of the human visual system.
The strong wavelength dependence of the Rayleigh scattering (~λ−4) means that shorter (blue) wavelengths are scattered more strongly than longer (red) wavelengths. This results in the indirect blue and violet light coming from all regions of the sky. The human eye responds to this wavelength combination as if it were a combination of blue and white light.