Air molecules (N₂, O₂) scatter light inversely proportional to the fourth power of wavelength:
At noon, short blue wavelengths scatter in all directions, illuminating the sky. At sunset, the optical path length (Air Mass) increases over 38-fold, extinguishing blue and green photons and allowing only long red-orange wavelengths to reach the observer.
During the "Blue Hour" (-4° to -8° solar depression), sunlight passes through the high stratosphere where the Chappuis absorption band of Ozone (O₃) attenuates yellow and orange light (550–610 nm), preserving deep royal blue and violet twilight skies.
This educational sky tool estimates relative air mass from solar elevation. Its formula gives about one at ninety degrees and three point eight one three at fifteen degrees. At the standard profile and turbidity point one five, its red, green and blue extinction sums are point one one one, point two zero eight five and point three five four. Transmission is exponential of minus air mass times that sum. At fifteen degrees the three channel results are about point six five four nine, point four five one six and point two five nine three. Common five hundred pixels per transmission unit makes their bar lengths about three hundred twenty-seven point five, two hundred twenty-five point eight and one hundred twenty-nine point six. These are source illustrative channel coefficients, not a calibrated atmospheric measurement. The bottom graph uses a different spectral approximation: Rayleigh point zero zero eight times five hundred fifty divided by wavelength to the fourth power, plus a turbidity term and an ozone branch. At four hundred forty nanometers the Rayleigh term is point zero one nine five three one; at six hundred eighty it is point zero zero three four two four. At default fifteen degrees, including the graph’s aerosol and ozone terms gives transmissions about point eight five four eight three and point nine three seven zero five. Common five hundred pixels per transmission unit gives about four hundred twenty-seven point four and four hundred sixty-eight point five. These graph values are not the upper blue and red channel transmissions. Its nine sample points are spaced by array index, so the final twenty-nanometer gaps still receive the same drawing width as forty-nanometer gaps. At solar angles from zero to fifteen degrees, this source assigns horizon red one, green point three plus point four eight times angle divided by fifteen, and blue point zero five plus point eight five times that ratio. At zero degrees its rounded RGB is two hundred fifty-five, seventy-seven, thirteen. At fifteen degrees it is two hundred fifty-five, one hundred ninety-nine, two hundred thirty. Common one pixel per integer channel shows those prescribed endpoints. In this branch those horizon colors do not depend on turbidity or optical profile, although other outputs do. The color temperature label is another angle and turbidity heuristic, not a temperature fitted from the spectrum. Twilight also switches formulas. Use the controls to explore the programmed approximation, not to forecast an actual sunset or infer measured atmospheric composition.