Sunsets often appear red, orange or pink because sunlight from the setting Sun travels through a much longer path in Earths atmosphere than sunlight arriving when the Sun is high in the sky. As this light passes through atmospheric molecules, shorter wavelength visible light such as blue and violet is scattered out of the direct path more strongly than longer wavelength light such as red and orange.
The direct solar beam reaching an observer near sunset is therefore depleted in shorter wavelengths and relatively enriched in longer wavelengths. The Sun and nearby sky consequently appear warmer in colour. The effect is an example of wavelength dependent scattering, principally Rayleigh scattering under clean atmospheric conditions. The exact observed colour is not determined by the Sun itself changing colour. The solar spectrum remains broadly similar, but the atmosphere modifies the spectral composition of the light that reaches the observer.
Rayleigh scattering occurs because atmospheric molecules are much smaller than visible wavelengths and interact with the electric field of sunlight. The intensity of Rayleigh scattering varies strongly with wavelength, approximately following an inverse fourth power relationship under ideal conditions. Blue light therefore has a substantially greater probability of being scattered than red light. During a sunset, sunlight must pass through a long oblique atmospheric path because the Sun is close to the horizon.
The longer path increases the cumulative scattering and absorption experienced by the direct beam. Blue light that is scattered away from the direct solar beam can contribute to the blue appearance of other parts of the sky, while the remaining direct beam becomes progressively more dominated by yellow, orange and red wavelengths. The atmospheric path length is therefore a central geometric reason why sunset colours differ from ordinary daytime sunlight.
The strongest and most dramatic sunset colours often occur when the atmosphere contains aerosols such as dust, smoke, volcanic particles or pollution. These particles can scatter and absorb light differently from individual nitrogen and oxygen molecules. Larger particles can produce Mie scattering, which has a weaker wavelength dependence than Rayleigh scattering and can alter the balance of light reaching the observer.
Aerosols can sometimes enhance reds and oranges by preferentially modifying shorter wavelengths, while in other circumstances heavy haze can make sunsets pale, yellow, white or brownish. Volcanic eruptions can inject particles high into the atmosphere and produce unusual red or purple twilight effects that persist for extended periods. Wildfire smoke can similarly alter sunset colours. Consequently, there is no single sunset colour produced under every atmospheric condition.
Clouds strongly influence the appearance of sunsets because water droplets and ice crystals scatter sunlight efficiently across the visible spectrum. High or thin clouds can become illuminated from below or from the side by low angle sunlight and display pink, orange, red, gold or purple colours. Their appearance depends on cloud altitude, thickness, particle size, viewing geometry and the changing illumination during twilight.
A cloud can remain illuminated by sunlight even after the Sun has dropped below the horizon for an observer at ground level if the cloud is high enough to remain in direct sunlight. This explains why upper clouds can glow after the solar disc has disappeared. Thick low clouds may instead block direct sunlight and produce dark or grey skies. Sunset colour is therefore an optical interaction among solar illumination, atmospheric transmission, scattering, cloud geometry and the observers position.
Sunset colours also involve the distinction between direct sunlight and diffuse skylight. Direct sunlight is the light travelling from the solar disc to the observer without being redirected through large angle scattering events. Diffuse skylight consists of sunlight scattered by the atmosphere into other directions. Near sunset, the direct beam becomes progressively redder because shorter wavelengths have been removed from it, while the surrounding sky can retain mixtures of blue, purple, pink and orange depending on geometry and aerosol conditions.
The human eye then interprets these spectral distributions through colour vision. Cameras can produce different apparent sunset colours because automatic exposure, white balance, sensor response and image processing alter recorded intensities. A photograph is therefore not always a direct quantitative representation of the physical spectrum perceived by the observer.
The red appearance of a sunset does not mean that red light is inherently less energetic than all forms of sunlight in a way that directly causes the colour. Red photons have lower energy than blue photons because photon energy is inversely proportional to wavelength. The atmosphere preferentially scatters the higher frequency, shorter wavelength components, leaving a greater proportion of lower frequency, longer wavelength light in the direct beam.
The energy difference between individual visible photons is therefore relevant to their interaction with matter, but the observed colour is primarily a consequence of wavelength selective scattering and the spectrum of transmitted light. This distinction is important because sunlight also contains ultraviolet and infrared radiation, neither of which contributes directly to ordinary visible sunset colour even though both interact with the atmosphere and can influence the total solar radiation environment.
The sequence of colours during twilight is caused by continually changing geometry rather than by a sudden physical transformation of the Sun. As the Sun approaches the horizon, the atmospheric path through which direct sunlight travels increases. After the solar disc sets, the atmosphere can continue to receive sunlight at higher altitudes even though the ground observer is in the shadow of Earth. Different layers of the atmosphere therefore contribute differently to twilight illumination.
Civil, nautical and astronomical twilight are conventional categories based on the Suns angular position below the horizon, but the actual appearance of the sky depends strongly on atmospheric conditions. The reddest or most vivid part of a sunset may occur shortly before or after the apparent disappearance of the solar disc, depending on cloud and aerosol distribution.
The physics of red sunsets is an important practical demonstration of optical scattering, atmospheric composition and viewing geometry. A clean atmosphere tends to produce a relatively predictable transition from yellow to orange and red as the direct solar beam becomes increasingly filtered by the long atmospheric path, while aerosols and clouds can introduce much greater variation. The same wavelength dependent scattering responsible for the blue daytime sky contributes to the removal of blue light from the setting Suns direct beam. Sunset colour therefore does not require a separate mechanism from daytime sky colour. It is the result of the same atmosphere viewed through a different path length and geometry, with additional effects from particles, clouds, absorption and human visual perception determining the final appearance.