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

What color is the sun: the measured answer, hour by hour

Everyone online says the sun is white and nobody gives a number. I rendered it from the reference solar spectrum: #FFF2EF above the atmosphere, 5,933 K, and sitting 0.21 CIEDE2000 from a perfect blackbody. Overhead at noon its disc is 1.14 from the white of the daylight it makes, which is why you call it white. On the horizon it is #FF4E00 at 1,278 K. The sky is the exact light it lost.

The sun is white, and the useful version of that answer is a number: with the sun straight overhead, its disc sits 1.14 CIEDE2000 from the white of the daylight it is creating. That is below the threshold at which anyone reliably tells two colors apart. Not close to white, not effectively white. White, by measurement.

Search this question and you get the same sentence returned a few hundred times. The sun is white, it only looks yellow because of the atmosphere, astronauts see it white. All true, and none of it committed to a quantity. Nobody says how yellow the atmosphere actually makes it, or whether that yellow is something a person could see, or what the color is at four in the afternoon rather than at noon.

So I built the sun out of published spectra and rendered it at every solar angle from overhead to the horizon.

How I measured it

Three ingredients, all of them public and none of them mine.

  • The sun’s spectrum. ASTM G173-03, the reference solar spectra distributed by the US National Renewable Energy Laboratory. It gives the extraterrestrial spectrum, meaning sunlight above the atmosphere before Earth touches it, alongside the direct beam measured through a standard atmosphere at an air mass of 1.5.
  • The atmosphere. Dividing one of those spectra by the other gives the extinction of the air at every wavelength, with no model and no fitted constants in it. Scale that by air mass and you can put the sun anywhere in the sky. Air mass comes from Kasten and Young’s 1989 formula, which accounts for the curve of the atmosphere and so does not blow up at the horizon the way a plain secant does.
  • The eye. The CIE 1931 two degree standard observer, at 1 nm, turning each spectrum into XYZ and then into sRGB and CIELAB. Color differences are CIEDE2000.

One convention matters for reading the hex codes below. A light source does not have a color on its own, it has a color relative to whatever you are calling white. Every swatch here is rendered against sRGB’s D65 white point, which is what your screen means by white, with the brightest channel pushed to full. That choice is doing real work, and I come back to it later, because it is most of the reason this question confuses people.

As a check on the atmospheric part, the Rayleigh scattering figures I use come out at an optical depth of 0.0973 at 550 nm, which is the published sea level value to four decimal places.

The sun before Earth gets to it

Above the atmosphere, sunlight renders as #FFF2EF. Its chromaticity is x 0.3234, y 0.3327, and its correlated color temperature is 5,933 K. On a D65 screen that reads as an almost imperceptibly warm white, 5.75 CIEDE2000 from the screen’s own white.

The more interesting number is how close that spectrum sits to a perfect thermal radiator. Its distance from the Planckian locus is 0.00015 in the standard Duv measure, and rendered side by side, sunlight and a 5,933 K blackbody differ by 0.21 CIEDE2000. That is roughly a fifth of the smallest difference a person can pick out under ideal conditions.

This is worth sitting with. Every artificial light in your house gets a correlated color temperature, and the word correlated is a hedge. It means the lamp is not actually a blackbody, so the best you can do is name the blackbody it comes nearest. LEDs and fluorescent tubes need that hedge badly. The sun does not need it at all. It is the one light in your life that genuinely is the thing the number describes, and our guide to color temperature goes into why the Kelvin scale is so much less uniform than it looks.

Push the same spectrum through the atmosphere and it stops being a blackbody. At the standard air mass of 1.5 the direct beam is 2.42 CIEDE2000 away from the blackbody nearest to it, which is eleven times further off the locus than the raw sun. The atmosphere does not just dim sunlight and tint it. It breaks the one clean physical property sunlight had.

The sun does not peak in green

A claim that keeps surfacing near the top of this search is that the sun’s output peaks at a green wavelength. It is a good story, and the measured spectrum does not support it.

The reference extraterrestrial spectrum peaks at 451 nm. Smooth out the Fraunhofer absorption lines with a 20 nm window and the peak moves to 457 nm. Either way it is blue. The top of the curve is also very flat: everything from 450 to 495 nm sits within 5 percent of the maximum, and that whole window is blue.

Where does green come from, then? From Wien’s displacement law applied to an idealised blackbody at the sun’s effective temperature of 5,772 K, which lands at 502 nm. That is a statement about a theoretical object, not about the sun that was actually measured. The real spectrum peaks about 50 nm shorter.

There is a second problem underneath the first, and it is a nice one. A spectrum’s peak depends on the units you write it in. Measured per nanometre of wavelength, sunlight peaks at 451 nm, in the blue. Measured per hertz of frequency, which describes exactly the same light, the same data peaks at 933 nm, in the near infrared. Nothing about the sun changed between those two sentences. The peak is a property of the graph paper, not of the star, which is a good reason not to build an answer about color on top of it.

What the air takes, and from where

With the sun straight overhead, at an air mass of exactly 1, here is what the atmosphere removes from the direct beam.

380 to 450 nmloses 33.42% violet
450 to 495 nmloses 24.31% blue
495 to 570 nmloses 19.71% green
570 to 590 nmloses 18.75% yellow
590 to 620 nmloses 17.17% orange
620 to 750 nmloses 13.49% red

Violet loses two and a half times as much as red. That gradient is the whole of the yellowing, and it is remarkably gentle for something the entire internet describes as the reason the sun looks yellow.

The famous inverse fourth power law needs a caveat here that almost nobody attaches to it. Rayleigh scattering really does go as wavelength to the power of minus four, and my implementation fits at minus 4.09 across the visible band, so the textbook is right about the physics. But the real atmosphere’s total extinction of the direct beam fits at wavelength to the power of minus 2.17, less than half as steep, because aerosols and ozone sit on top of the molecular scattering and neither of them obeys that law.

Broken down by wavelength, Rayleigh scattering accounts for 77.3 percent of the extinction at 400 nm, 46.9 percent at 550 nm, and only 27.3 percent at 700 nm. So the honest version is that molecular scattering explains the blue end and something else explains most of the red end. If you have ever wondered why the same physics gets quoted for the sky and the sunset when they are different colors, that is a large part of it.

The sun, hour by hour

Now the actual answer. Each swatch is the direct beam at that solar zenith angle, rendered against a D65 white.

Straight overhead 0 degrees · air mass 1.00
#FFEEDF · 5,441 K · 5.48 from its color in space · 81.05% of the light still arriving
Mid morning 30 degrees · air mass 1.15
#FFEEDC · 5,374 K · 6.20 from its color in space · 78.47% of the light still arriving
The standard test condition 48 degrees · air mass 1.50
#FFECD7 · 5,233 K · 7.69 from its color in space · 73.01% of the light still arriving
Mid afternoon 60 degrees · air mass 1.99
#FFEAD0 · 5,045 K · 9.61 from its color in space · 65.81% of the light still arriving
Late afternoon 70 degrees · air mass 2.90
#FFE6C3 · 4,743 K · 12.54 from its color in space · 54.44% of the light still arriving
Golden hour 80 degrees · air mass 5.59
#FFDAA1 · 4,063 K · 18.32 from its color in space · 31.19% of the light still arriving
Low sun 85 degrees · air mass 10.31
#FFC570 · 3,269 K · 23.76 from its color in space · 11.84% of the light still arriving
Nearly down 88 degrees · air mass 19.43
#FF9D28 · 2,309 K · 28.83 from its color in space · 1.90% of the light still arriving
On the horizon 90 degrees · air mass 37.92
#FF4E00 · 1,278 K · 33.35 from its color in space · 0.06% of the light still arriving

The shape of that list is the finding. From overhead to late afternoon, seventy degrees of sky and most of the day, the sun shifts by 12.54 CIEDE2000. From late afternoon to the horizon, twenty degrees, it shifts by another 20.81. The last few degrees do more to the color of sunlight than the entire rest of the day, because air mass is not linear in angle: it goes from 1.0 to 2.9 across those first seventy degrees and from 2.9 to 37.9 across the last twenty.

The brightness column tells the same story more bluntly. At the horizon the direct beam is carrying 0.06 percent of the light it had in space. Sunsets are not a color effect that happens to be dim. They are what is left after the atmosphere has taken 99.94 percent of the light, and the color is the receipt.

One caution about the bottom of that table. Extrapolating extinction to an air mass of nearly 38 assumes every component of the atmosphere thickens at the same rate, and ozone in particular does not, because it sits in a layer high above most of the air. The horizon figures are the right shape and I would not defend the last hundred Kelvin of them.

Why you still call it white

Here is where the D65 convention I flagged earlier starts to matter. Those swatches show sunlight compared to your screen’s idea of white. But nobody looks at the sun next to a screen. You look at the sun in a world that the sun itself is lighting, and your visual system quietly renormalises to whatever is filling the scene. Rerun the whole ladder with the observer adapted to daylight rather than to D65 and the numbers change completely.

  • Overhead, the sun’s disc is 1.14 CIEDE2000 from the white of the scene around it. That is below the threshold we measured for real color discrimination.
  • At the standard 48 degrees it is 4.03, which is visible if you have something to compare against and invisible if you do not.
  • At golden hour it is 17.36, and on the horizon it is 34.80. By then nobody needs a reference. Sunset is obvious precisely because it outruns adaptation.

Take an astronaut with nothing in view but sunlight and the number goes to 0.00 exactly. Adapted to the sun, the sun is #FFFFFF. Not approximately. The adaptation transform sends it to the white point by construction, which sounds like cheating until you notice that this is also how the definition of white got made in the first place. We calibrate our whites to daylight because we evolved under daylight. Asking what color the sun is turns out to be close to asking what color white is.

The nice inversion falls out of the same maths. Take the raw above-atmosphere spectrum and view it from inside a daylit scene, so that your eyes are adapted to ground level daylight rather than to space, and the sun renders as #F0F5FF, a faint blue. From down here, the sun as it exists in space would look slightly cold. Whether sunlight is warm or cool depends entirely on which sunlight you grew up normalising to, which is the same lesson our piece on color constancy arrives at from the other direction, and the same mechanism that made the dress split the internet.

The sky is the light the sun lost

This is usually stated as a metaphor. It is not one, and it checks out numerically.

Take the above-atmosphere spectrum, subtract the part that survives to the ground, and keep only what molecular scattering removed. Render that leftover light and you get #8EB6FF. Separately, model the zenith sky the proper way, as sunlight singly scattered along the vertical path with extinction on both legs, and you get #91BBFF. Those two are 0.73 CIEDE2000 apart, which is below the threshold of visible difference. The sky is not like the sun’s missing blue. It is the sun’s missing blue, to within the accuracy of your eye.

The energy ledger backs it up. Of the 655.8 watts per square metre of visible sunlight arriving at the top of the atmosphere, 522.0 reach the ground as direct beam, 73.3 are scattered out by air molecules, and 60.5 go to aerosols and absorption. So 11.2 percent of the visible sun becomes sky, and 9.2 percent becomes haze and heat.

Which is why the sky is not as blue as the physics says

Pure Rayleigh scattering, on its own, gives an absurdly blue sky: #94BEFF at a correlated color temperature of 37,600 K. Real clear skies measure somewhere around 10,000 to 25,000 K. The model is not wrong, it is just incomplete, and what is missing is dust. Aerosols scatter more or less evenly across the visible band, so every particle in the air dilutes the blue toward white. Feeding the non-molecular part of the measured extinction back in as a grey scatterer gives this ladder.

Perfectly clean air #94BEFF · 37,600 K molecular scattering only
High mountain #B0CBFF · 15,179 K
Good clear day #C5D5FF · 11,060 K
Hazy lowland #DBE1FF · 8,614 K

Real measured skies land in the middle two rows, which is a decent sign the model is behaving. It also reframes the standard explanation. Rayleigh scattering decides that the sky is blue rather than some other hue. How blue is decided almost entirely by how much junk is in the air, which is why the sky over a mountain looks like a different colour from the sky over a city, and why photographs from high altitude look oversaturated to people who have never been up there. Our piece on why the sky is blue and why the ocean is blue take that apart properly, including the reason neither of them is violet when the physics says both should be.

So what do you tell someone

The sun is white. Overhead it is 1.14 CIEDE2000 from the white of its own daylight, which is under the threshold, so the answer is not a technicality. Rendered against a screen white it is #FFF2EF in space and #FFEEDF from the ground at noon, and it is a near perfect 5,933 K blackbody, closer to one than any lamp you own. It does not peak in green. It peaks at 451 nm in the blue, and the peak moves to the infrared if you rewrite the axis, so the peak was never the right thing to point at.

What is genuinely yellow is the sun at a low angle, and it gets there fast: 5.48 CIEDE2000 of shift overhead, 33.35 on the horizon, six times as much, nearly all of it accumulated in the last twenty degrees. And the blue it drops on the way down does not vanish. It goes up, spreads out and becomes the sky, at #8EB6FF, matching the light that was removed to within 0.73.

The part I find hardest to shake is the adaptation result. A star with a measurable, non-neutral spectrum reads as exactly zero units from white, because we built the concept of white out of that star. It is the same blind spot as the color of a mirror, which is measurably green and which nobody ever notices, for the same reason: with nothing to compare against, a real difference simply stops registering. Put the comparison back and your eye is far better than it seems. That is the entire premise of our color memory game, and if you want to feel the difference between remembering a color and seeing two side by side, the gradient mode and the guide to training your eye are the places to start. The just noticeable difference piece has the thresholds every number on this page is measured against.