Color Memory Game
By John K.··12 min read

Why is the sky blue: the measured answer, and the violet problem

The clear sky renders as #A3C5FF at 17,258 K. The famous puzzle about violet has a number attached to it that almost nobody quotes: the sky really does send you 7 percent more light at 420 nm than at 460 nm. It looks blue anyway because your eye is 6.7 percent as sensitive there. Built from the reference solar spectrum, with the ozone nobody mentions.

The sky is blue because small molecules scatter short wavelengths far harder than long ones. That part of the answer is correct, famous, and does about a third of the work. The rest of it is the bit that gets skipped: the sky sends you more violet light than blue light, and you see blue regardless, because the violet arrives at a part of your retina that barely responds.

Rendered from the reference solar spectrum, a clear sky comes out at #A3C5FF, a correlated color temperature of 17,258 K, and a saturation of only 29.2 percent. So I built the whole thing, put a number on the violet, and found that the one component doing the most to fix the sky’s color is not in any of the popular explanations at all. It is ozone.

How I measured it

Same toolkit as our piece on what color the sun is, pointed upward instead of at the disc.

  • The light going in. ASTM G173-03, the reference solar spectra published by the US National Renewable Energy Laboratory. The extraterrestrial spectrum is sunlight before Earth touches it. The direct beam is the same light measured through a standard atmosphere. Dividing one by the other gives the atmosphere’s extinction at every wavelength, measured rather than modelled.
  • The scattering. Rayleigh optical depth from Hansen and Travis, which reproduces the published sea level value of 0.0973 at 550 nm to four decimal places. Sky radiance is the standard single-scattering solution for a plane-parallel atmosphere, so the light is attenuated on the way in and again on the way out.
  • The eye. CIE 1931 two degree standard observer at 1 nm, into XYZ, then sRGB and CIELAB. Distances are CIEDE2000, and our guide to that formula covers why the plain Euclidean version misleads badly in blues.

Subtracting Rayleigh from the measured total extinction leaves everything the air does that is not molecular scattering. That residual fits a power law with an Ångström exponent of 1.26, which is a textbook continental aerosol, and it lands at an aerosol optical depth of 0.072 at 550 nm. Neither number was fitted to anything. They fell out of the reference spectra, and they agree with the published ranges, which is the best evidence I have that the separation is doing something real.

One convention, as ever. Every swatch is rendered against sRGB’s D65 white with the brightest channel pushed to full, so you are seeing the sky’s hue and saturation, not its brightness. The real sky is also much dimmer than your screen, and that matters less than you would think, because the interesting content of this question is entirely chromatic.

The color of the sky

Three versions of the same patch, adding one piece of atmosphere at a time.

Molecular scattering alone
#93BBFF · 24,549 K · the textbook sky, and nowhere on Earth
With the measured aerosol
#A4C5FF · 17,108 K · 2.59 CIEDE2000 of dilution
With ozone as well: the real clear sky
#9FC2FF · 19,033 K · ozone pulls 0.80 back toward blue

Published measurements of clear zenith skies run from roughly 10,000 K on a hazy lowland day to about 27,000 K in clean mountain air. The model lands at 19,033 K without being told to, which is the check I care about most.

Note the direction of the third row. Aerosol dilutes the blue, as everyone expects. Ozone then pushes it back, and I will come to why, because it is the most surprising thing on this page.

The violet problem, with numbers

Here is the question that has been circling this topic since Rayleigh published. If scattering goes as wavelength to the power of minus four, violet at 400 nm should be scattered about 1.7 times as strongly as blue at 460 nm. So why is the sky not violet?

The usual answer is that the sun emits less violet, and that our eyes are less sensitive to it. Both are true. What almost nobody does is weigh them against each other, and when you do, they turn out to be nowhere near the same size.

  • The sun emits 80.1 percent as much at 420 nm as it does at 460 nm. A real deficit, and a small one.
  • Rayleigh scattering is 45.5 percent stronger at 420 nm than at 460 nm. That more than cancels the deficit.
  • Net result: the sky sends you 107.1 percent as much light at 420 nm as at 460 nm. There is genuinely more violet than blue coming down. The scattered spectrum peaks at 402 nm, right at the violet edge.
  • Your eye is 6.7 percent as sensitive at 420 nm as at 460 nm.

So the emission argument is a rounding error and the sensitivity argument is the whole thing. The sky is not blue because there is more blue in it. The sky is blue because the violet is invisible to you.

Splitting the scattered light into bands makes the size of the discard obvious. The upper bar in each pair is the share of light the sky actually sends. The lower bar is the share your eye reports back.

380 to 450 violet36.7%1.1%
450 to 495 blue20.4%8.5%
495 to 570 green21.2%60.6%
570 to 590 yellow3.8%13.0%
590 to 620 orange4.8%10.8%
620 to 750 red11.6%4.1%

Over a third of the light in a clear sky is violet, and it contributes 1.1 percent of the brightness. Meanwhile green, which is a fifth of the light, supplies 60.6 percent of what you see. Your visual system is throwing away the single largest component of the signal and building the answer out of a band you would not name if asked what color the sky was.

You can push this further and ask what the sky would look like to something that could see the violet properly. Boosting the standard observer’s response below 450 nm by up to four times and rerunning the same spectrum gives #8A9BFF, sitting 7.1 CIEDE2000 from what we see. That is a large, obvious difference, well past the point where anyone would call them the same color. A creature with useful violet cones lives under a visibly different sky, and this one is not a thought experiment for its own sake: people with a fourth cone type are the same question asked at the other end of the spectrum.

There is one more layer under this that gets left out. The lens in your eye yellows with age and absorbs short wavelengths, and the ocular media block a good deal of violet before it ever reaches a cone. So the 6.7 percent is not a fact about photoreceptors. It is a fact about the whole optical assembly, and it is not the same number in a twenty year old and a seventy year old.

The sky is barely blue at all

Saturation is where the intuition falls apart hardest. Measured as excitation purity, which is how far a color sits from white along the line toward its pure spectral hue, the clear sky comes in at 29.2 percent.

Pure sRGB blue, #0000FF, measures 92.5 percent. The sky is roughly a third of the way from white to a real blue. It reads as intensely colored because it covers the entire visual field with nothing to compare it against, which is the same trick that makes color constancy so hard to catch yourself doing.

Its dominant wavelength is 476 nm. That is cyan, not blue. Ask someone to point at 476 nm on a spectrum and they will call it a greenish blue, well away from where they would put the word blue on its own. The sky has been the reference example of blue for as long as the word has existed, and it sits on the cyan side of the boundary.

Haze changes how blue, never which blue

Turning the aerosol up and leaving everything else alone gives the cleanest result on this page.

No aerosol at all
#91BBFF · 25,218 K · purity 35.1% · dominant 476 nm
Pristine mid-ocean air
#96BEFF · 22,164 K · purity 33.3% · dominant 476 nm
A very clear day
#9EC2FF · 18,956 K · purity 30.8% · dominant 476 nm
The standard atmosphere
#A3C5FF · 17,258 K · purity 29.2% · dominant 476 nm
Hazy
#B9D2FF · 12,168 K · purity 21.9% · dominant 476 nm
Smoke or heavy pollution
#CFDFFF · 9,380 K · purity 14.6% · dominant 476 nm

Across a twentyfold change in aerosol, from cleaner than anywhere on Earth to a wildfire day, the dominant wavelength does not move by a single nanometre. Purity falls by more than half and the color temperature drops by 16,000 K, but the hue is pinned at 476 nm the whole way down.

That is worth stating plainly, because it splits the question in two. Rayleigh scattering decides which color the sky is, and it is the only thing that decides it. How much of that color you get is decided entirely by how much junk is in the air, and Rayleigh has no say in it. Every sky you have ever seen was the same hue at a different strength, which is also why photographs taken at altitude look oversaturated to anyone who has not been up there.

The ozone nobody mentions

Subtract Rayleigh scattering from the measured total extinction and the leftover should be aerosol, which falls off smoothly with wavelength. It mostly does, except for a broad hump sitting on top of it, peaking at 585 nm and reaching an optical depth of 0.066.

That is the Chappuis band of ozone, a weak absorption feature centred near 600 nm. Ozone is famous for stopping ultraviolet, and its ultraviolet absorption is thousands of times stronger than this. But the ultraviolet band does nothing to the color of the sky, because you cannot see ultraviolet. The Chappuis band sits directly in the yellow and orange, which is exactly where a sky diluted by aerosol is picking up its unwanted warmth.

Take the ozone out of the model and the sky moves 0.80 CIEDE2000 toward white, and the color temperature drops from 19,033 K to 17,108 K. Ozone is running a permanent, planet-wide correction that removes the yellow and returns the blue that haze took out.

The size of it deserves attention. 0.80 CIEDE2000 is below the threshold at which most people reliably see a difference, so on any given afternoon you would not notice. It becomes obvious at twilight, when the sun is below the horizon, the path through the ozone layer is enormously long and Rayleigh scattering has almost nothing left to work with. The deep blue of the sky twenty minutes after sunset is substantially an ozone effect rather than a scattering one, which is a claim I would have dismissed before running the residual and finding the band sitting there in the reference data.

Across the dome

The sky is not one color, and single scattering predicts the variation rather well. First, holding the sun at 45 degrees and sweeping the viewing direction away from it.

10 degrees from the sun
#E0EAFF · 8,041 K
30 degrees from the sun
#C9DBFF · 10,042 K
60 degrees from the sun
#AECBFF · 14,262 K
90 degrees from the sun
#A3C5FF · 17,258 K
120 degrees from the sun
#9BC1FF · 19,949 K
180 degrees, directly opposite
#97BFFF · 21,774 K

The near-sun sky is almost white, and it recovers its blue steadily as you look away. The mechanism is the shape of the two scattering processes. Aerosol particles are large compared to the wavelength and throw light strongly forward, so close to the sun the pale, colorless aerosol glare dominates. Air molecules are small and scatter nearly evenly forward and back. Look away from the sun and the forward lobe falls off a cliff while the molecular scattering barely changes, so what is left is much more purely Rayleigh, and much bluer.

Photographers have used this for a century without needing the numbers. Standing with the sun at your shoulder and shooting at right angles to it gets you a deep blue sky and a strong polarising filter effect, both for the same reason.

One honest limitation. My model keeps getting bluer all the way to 180 degrees, whereas the real sky is bluest somewhere around 90 to 120 degrees from the sun and then flattens off. Single scattering is the cause of the discrepancy. Real photons bounce more than once, and the multiply-scattered light fills in the anti-solar sky with a paler mixture that this model has no way to represent. The trend from 10 to 90 degrees is the part I would defend.

Second, keeping the sun fixed and dropping the view toward the horizon.

Straight up
#A1C3FF · 18,083 K
45 degrees above the horizon
#A3C5FF · 17,258 K
30 degrees above the horizon
#A5C7FF · 16,265 K
15 degrees above the horizon
#ACCEFF · 14,036 K
5 degrees above the horizon
#BEDBFF · 10,745 K
The horizon itself
#C8E0FF · 9,752 K

From straight up to 30 degrees, which is most of the sky by area, the color shifts by under one CIEDE2000. Below 15 degrees it falls apart quickly. The horizon is 6.8 from the zenith, an unmistakable difference, and it is the same air-mass effect that turns the sun orange as it sets, just seen from the side. The blue you lose near the horizon has been scattered a second time by the extra air in the way, and the pale band above the skyline is that light arriving from every direction at once.

Every named sky blue is the wrong color

Given the measured sky is #A3C5FF, how do the blues actually named after it do? Distances are CIEDE2000, where about 1.0 is the smallest difference a person can reliably detect and 2.3 is the figure our just noticeable difference piece settles on for ordinary viewing.

CSS cornflowerblue #6495ED · 6.1 away
Pantone 291 C #9BCBEB · 7.7 away
CSS lightskyblue #87CEFA · 10.0 away
CSS dodgerblue #1E90FF · 11.3 away
CSS skyblue #87CEEB · 13.5 away
CSS aliceblue #F0F8FF · 16.6 away
CSS deepskyblue #00BFFF · 17.8 away
Crayola Sky Blue #80DAEB · 19.6 away

Not one of them is close. The web color literally called skyblue is 13.5 away, which is roughly six times the threshold at which two colors stop looking the same. The nearest thing on the list is cornflowerblue at 6.1, named after a flower. Deepskyblue, which sounds like it should be the deep clear sky, is the second worst on the list.

Every one of the misses runs the same direction: they are all too green and too saturated. #87CEEB has a dominant wavelength of 484 nm against the sky’s 476, and 26.5 percent purity against 29.2. The names were chosen by eye, from memory, and memory for color drifts toward the prototype rather than the sample, which is precisely the effect our memory colors piece is about. If you would like to feel how far your own memory of a color slides in a few seconds, that is what the color memory game measures, and gradient mode is the version that puts two blues side by side so you can see how good you are when memory is taken out of it.

A note on the minus four

The inverse fourth power law gets quoted as though it describes the sky. It describes the scattering cross-section. My implementation fits wavelength to the power of minus 4.08 across the visible band, so Rayleigh was right.

The sky itself is a different curve. The molecular sky’s radiance fits minus 3.96, slightly shallower, because the solar spectrum falls off in the violet and because the atmosphere saturates: once a wavelength is being scattered almost completely, scattering it harder adds nothing. Put the real aerosol and ozone back in and the sky fits minus 3.42. Still steep, and no longer the number in the textbook. If you have ever tried to check the minus four against a photograph of the sky and found it did not work, this is why. You were measuring the wrong quantity.

So what do you tell someone

Air molecules scatter short wavelengths much harder than long ones, and that decides the hue. Everything after that is qualifications, and the qualifications are more interesting than the headline.

The sky is #A3C5FF at 17,258 K, 29.2 percent saturated, with a dominant wavelength of 476 nm that is technically a cyan. More than a third of the light in it is violet, and that violet contributes 1.1 percent of what you see. The sky sends you 7 percent more light at 420 nm than at 460 nm, so the reason it is not violet has almost nothing to do with the sun and almost everything to do with the fact that your eye is 6.7 percent as sensitive at the violet end. Haze changes the saturation by more than half and the hue by nothing. And a trace gas absorbing in the orange is quietly holding the blue in place.

What stays with me is the discard. Your visual system takes the largest single component of the light arriving from the sky and reports essentially none of it, and it has been doing that in front of everyone for the whole history of the question. The famous puzzle was never why the sky is not violet. It is why we assumed we were being shown all of it. The same blind spot is why a mirror is measurably green and nobody notices, and why the sun that made our definition of white reads as exactly white to us. If you want the version of this you can actually test on yourself, our piece on how many colors you can see and the guide to training your eye are the places to go next. And if you want the same treatment applied to the other famous blue, the sea runs on the opposite mechanism and lands in a measurably different place: why the ocean is blue is built from the same toolkit.