The same sky can look blue at lunchtime and orange before nightfall. The Sun has not suddenly switched colors. What changes is the route its light takes through the air before reaching the ground. [1]
White light is a mixture
Sunlight contains a range of visible colors. A prism can separate that mixture, revealing a spectrum from red through violet. Those colors correspond to different wavelengths of light: blue wavelengths are shorter than red ones. [1]
Air is not completely invisible to light. Molecules in the atmosphere scatter some of the passing light in different directions. They scatter shorter visible wavelengths more strongly than longer ones. This helps explain why the daytime sky, away from the Sun, usually looks blue. [1]
A longer route through the atmosphere
When the Sun is low near the horizon, its light passes through more atmosphere than when it is high overhead. More of the blue and violet light is scattered away from the direct path. A larger share of the light continuing toward the observer is red, orange, or yellow. [2]
One process, two familiar views
A blue afternoon and a red evening are not separate tricks. Both depend on scattering. During the day, scattered blue light reaches the eyes from across the sky. Near sunset, the much longer path changes the balance of colors in the light arriving from the Sun’s direction. [2]
Sunrise can produce a similar display because the Sun is also low in the sky. Dust and other small particles can modify the colors, which helps explain why different mornings and evenings do not look exactly alike. [2]
The atmosphere becomes visible
A sunset is a familiar scene with an unfamiliar mechanism. Its colors make an otherwise hard-to-see interaction visible: light traveling through a layer of gas and particles surrounding an entire planet. [2]
Sources and image credit
1. NASA Space Place: Why Is the Sky Blue?
2. National Weather Service: Why Is the Sky Blue?
Cover: Commander John Bortniak, NOAA Corps (retired) / NOAA. Public domain. Resized and cropped or letterboxed to a 16:9 cover. Image source · Usage / license
