Sunlight Isn't Blue, So Why Does the Sky Look That Way?

Sunlight looks white, or maybe slightly yellow depending on the time of day, but it's actually carrying every visible color at once, blended together in a way that reads as colorless to the human eye. The sky turning blue isn't the sun sending down blue light specifically — it's the result of something happening to that mixed light on its way through Earth's atmosphere, and the explanation comes down to how differently colored light behaves once it collides with the air itself.
Light travels in waves, and different colors correspond to different wavelengths. Red light has a relatively long wavelength, while blue and violet light sit at the short end of the visible spectrum. When sunlight enters the atmosphere, it runs into countless tiny gas molecules, mostly nitrogen and oxygen, and this is where things get interesting. Those molecules are small, much smaller than the wavelength of visible light, and when light hits particles that small, it scatters in a very particular, wavelength-dependent way described by a physicist named Lord Rayleigh in the 1870s, which is why the phenomenon is called Rayleigh scattering.
Rayleigh scattering has a key property: shorter wavelengths scatter far more intensely than longer ones. Blue light gets scattered roughly ten times more than red light as it bounces around among atmospheric molecules, which means that as sunlight passes through the atmosphere, blue light gets deflected in every direction far more aggressively than red, orange, or yellow light does. That scattered blue light ends up radiating across the entire sky rather than traveling straight through to your eyes in one direct beam, which is exactly why, when you look up at a clear sky, you're not looking directly at the sun's light source, you're seeing blue light that's been bounced around and redirected toward you from countless different points across the atmosphere.
Violet light technically scatters even more than blue light, based purely on wavelength, and this is a detail that trips a lot of people up when they first learn about Rayleigh scattering. The sky isn't violet for two overlapping reasons: the sun emits somewhat less violet light to begin with compared to blue, and human eyes are simply less sensitive to violet wavelengths than they are to blue ones, thanks to how the cone cells in our retinas are distributed. The combination means blue dominates what we actually perceive, even though violet is technically scattering just as hard, if not slightly harder.
This same scattering mechanism explains why sunsets and sunrises look dramatically different from midday skies. When the sun sits low on the horizon, its light has to travel through a much thicker slice of atmosphere to reach your eyes compared to when it's directly overhead. That longer path means most of the blue light gets scattered away entirely before it ever reaches you, leaving the longer wavelengths, reds and oranges, to dominate what actually makes it through, which is why sunsets tend to paint the sky in warm colors rather than the cool blue seen during the middle of the day.
Different atmospheric conditions can shift the effect too. On hazy or polluted days, larger particles in the air, like dust or water droplets, scatter light differently than the tiny gas molecules Rayleigh's work focused on, often scattering all wavelengths more evenly, which is part of why smoggy or humid skies tend to look washed out, whitish, or gray instead of a crisp, saturated blue.
It's a strange kind of everyday magic, when you think about it. There's no blue pigment floating in the atmosphere, no blue filter over the sky. It's an optical outcome of physics operating at a scale too small to see directly, tiny air molecules doing exactly what wave mechanics predicts, scattering short wavelengths preferentially across the whole sky until, from the ground, the entire dome above you reads as one continuous shade of blue.
