Sky colours: from blue daylight to sunset and twilight

Sky colour depends on the atmosphere a ray crosses, where it changes direction, and the spectrum that reaches your eyes. Compare daylight, a low Sun and high clouds after sunset, then follow the light paths through scattering and extinction.

Why is the sky blue?

The sky is blue because air molecules redirect short wavelengths of light more readily than long ones — Rayleigh scattering. In this lesson's approximation, 450 nm blue light scatters about 4.35 times as strongly as 650 nm red light, so the skylight reaching your eye from a direction away from the Sun is dominated by blue. Violet scatters too, but sunlight contains less of it and the eye is less sensitive to it, so the overall impression is blue.

Why are sunsets red?

When the Sun is near the horizon its light crosses a far thicker slice of atmosphere before reaching you, and most of the blue has been scattered away along the path, leaving direct light dominated by orange and red — so the Sun and the clouds it lights turn red. Haze and aerosols change the path again: they can make an afterglow redder, but also paler or dimmer, so more haze does not simply mean a redder sunset.

What is twilight?

Twilight is the period after the Sun has set (or before it rises) when the upper atmosphere is still lit by sunlight and scatters that light down to the ground. Solar altitudes of −6°, −12° and −18° are the conventional boundaries of civil, nautical and astronomical twilight. High clouds a few kilometres up can still be in sunlight after the ground is in shadow, which is why they stay lit for a while after sunset.

Follow sunlight through a changing sky

The sky is not a fixed blue backdrop. When sunlight enters air, molecules redirect some of it towards your eyes from directions where the Sun is absent. This is scattered skylight; direct sunlight follows another path.

Start by turning your head in daylight

The sky is not a fixed blue backdrop. When sunlight enters air, molecules redirect some of it towards your eyes from directions where the Sun is absent. This is scattered skylight; direct sunlight follows another path.

Choose Daylight side view, then turn towards and away from the Sun while keeping its altitude fixed. Direction and elevation change the illustrative sky, but the three direct transmissions at the ground stay the same. They describe what remains along the solar beam, whose path is unchanged when you turn.

Blue sky and red sunlight can coexist

Air molecules redirect shorter wavelengths more readily, a process called Rayleigh scattering. In this approximation, the scattering coefficient at 450 nm is about 4.35 times the value at 650 nm. Looking sideways in daylight therefore often brings more blue skylight to the eye.

Lower the Sun to 3°. Its direct beam crosses more dense air, and more blue light is redirected before reaching you, leaving warmer direct sunlight. Compare the three transmissions, then return to 45°. The factor 4.35 describes molecular scattering, not a guaranteed blue-to-red brightness ratio for every patch of sky.

Haze and clouds add other light paths

Aerosols are tiny solid particles or liquid droplets suspended in air. Their size and material, and those of cloud droplets, affect how they scatter and absorb light. Mie scattering describes spherical particles; large ones often scatter strongly forward, which can make haze look whitish towards the Sun.

Keep the Sun at 3° and switch between clear air and haze. Compare the colours and direct transmissions. Extra particles may also absorb, obscure or dim the sunset, so more haze does not necessarily make it redder. These fixed example parameters do not represent today’s air quality.

The ground can be dark while clouds see the Sun

Choose Clouds after sunset, with the Sun at −1°. The ground has lost direct sunlight, but cloud A is still illuminated. Lower the Sun to −4° and watch A enter shadow. An elevated cloud sees a lower horizon, just as a mountain viewpoint can see farther than the ground below.

All these clouds sit at 8 km but in different directions, so each cloud-to-Sun path needs its own Earth-intersection check. Turning does not move the clouds. Their letters and the illumination list help you follow the same cloud through the change.

Twilight fades while your eyes adapt

After sunset, upper air can still send light to the ground. Light may be redirected more than once: multiple scattering. Visible absorption by ozone also influences twilight. The −6°, −12° and −18° boundaries name twilight stages; the sky changes continuously across them.

Your eyes combine many wavelengths into a colour, so the strongest-scattered wavelength does not alone determine what you see. This experiment calculates spherical shadowing and single scattering from molecules and simplified aerosols. Twilight colours are supplemented illustratively; full ozone, multiple scattering and camera exposure are not solved. Compare the causes before comparing the display with a real sky.

Lower the Sun towards the horizon

Change altitude and bearing to update the sky and ray diagram together. Four presets give repeatable starting points.

Illustrative colours, not a photograph, weather forecast or calibrated brightness.

Hold one condition fixed, change another, and compare illumination and transmission.

Spherical occultation and relative single scattering are calculated. Ozone, multiple scattering and a full Mie solution are discussed only. Twilight uses continuous illustrative colours; terrain, refraction, the Sun’s angular diameter and weather are omitted.

The window spans 120° with a top elevation of 80°. Dots select sample elevations. The Sun is an enlarged point-source marker, hidden below 0°. Cloud letters match the individual illumination list.

0° is the horizontal solar bearing; 90° and 270° are the two sides, and 180° is opposite the Sun. No compass direction is assigned.

Playback starts off and lowers the Sun at a teaching speed, stopping at −18°. It is not local clock time. Any manual control pauses playback.

The incident beam above the atmosphere is 1 at each wavelength; 0 means no remaining direct component. These values are neither total sky brightness nor RGB measurements.

The ray diagram marks a representative point at 8 km on the selected sightline. Its illumination describes one location. Skylight is integrated along the entire line of sight, so a shadowed sample does not imply a completely dark sightline.

Yellow arrows: direct light travelling towards the observer or sample. Dashed yellow: continuation of a direction blocked by Earth. Blue arrow: travel towards the eye along the selected line of sight.

Daylight side view

Sun 45°, bearing 90°, clear air, elevation 25°. Keep the altitude and compare bearings.

Low Sun

Sun 3°, bearing 0°, clear air, elevation 5°. Compare direct transmission at three wavelengths.

Clouds after sunset

Sun −1°, bearing 0°, high clouds, elevation 60°. Earth blocks the ground’s sunlight while cloud A remains sunlit.

Fading twilight

Sun −9°, bearing 90°, clear air, elevation 25°. Move gradually to −18° and follow the continuous darkening.

Four repeatable comparisons

Daylight: hold the Sun at 45° and compare solar, side and opposite bearings. Change sample elevation between 5°, 25° and 60° and read the 3D scattering angle.

Low Sun: lower solar altitude from 45° to 3° and compare path length and the three transmissions. Turning the view should leave ground-level direct readings unchanged.

High clouds: lower the Sun from −1° to −4° and track fixed cloud A into Earth’s shadow. Turn to the other letters and check each illumination state.

Twilight: move from −9° to −18°, then keep the angle while switching haze. Distinguish illustrative colour from calculated occultation and transmission.

Direct sunlight and scattered skylight

Sunlight spans a continuous range of wavelengths. In the solar direction, direct light is the part of the beam that has not been removed along its path. Elsewhere in the sky, light reaches you after molecules, aerosols or cloud particles redirect it. The two paths have different spectra, allowing a blue sky and an orange Sun at the same time.

Scattering redirects light; absorption transfers radiant energy to matter. Both remove light from a direct beam and together constitute extinction. Scattered light has not simply vanished: it may reach a different observer or scatter again.

The observer is fixed on a spherical Earth and solar altitude ranges from +60° to −18°. Azimuth 0° is the horizontal solar bearing, with 180° opposite it; sample elevations are 5°, 25° and 60°. Start with Daylight side view and turn towards the Sun. The sky changes, but turning your head does not change the direct transmission at the observer.

Rayleigh scattering favours shorter wavelengths

"Why is the sky blue?" In episode 6 of the anime ALDNOAH.ZERO, Slaine answers "refraction" and Inaho Kaizuka deadpans the correction: "Rayleigh scattering." The line became a running joke among viewers, who admit it is the one thing they remember from the whole series. Inaho was right: when particles are much smaller than the wavelength, Rayleigh scattering is a useful approximation. At a fixed molecular density its coefficient is approximately proportional to wavelength to the power −4, so the coefficient at 450 nm is about 4.35 times that at 650 nm. This is a ratio of molecular scattering coefficients, not a universal ratio of blue and red sky brightness — the half Inaho never got to, which this lesson fills in.

A fuller Rayleigh optical-depth calculation also accounts for molecular column density, refractive index and depolarization corrections. Here a fixed sea-level parameter and the λ⁻⁴ approximation isolate the wavelength dependence. These teaching values are not measurements of a particular city or atmosphere.

Near the horizon, the direct solar beam crosses a longer path through dense air, removing more short-wavelength light along the way. Choose Low Sun, compare transmission at 450, 550 and 650 nm, then raise the Sun. Reddened direct sunlight and blue daytime skylight arise from the same selective scattering along different paths.

βR(λ) ∝ λ⁻⁴; βR(450) / βR(650) ≈ (650 / 450)⁴ ≈ 4.35

βR is the molecular scattering coefficient and λ is wavelength. Both 450 and 650 use nm in the ratio. The approximation fixes molecular density, assumes particles much smaller than wavelength and omits fine refractive-index dispersion.

Wavelength and relative molecular scattering (550 nm = 1)

λ (nm)βR(λ) / βR(550 nm)
4502.232
5501.000
6500.513

The phase function describes scattering directions

The Rayleigh phase function gives the angular distribution for one scattering event. Here θ is the angle between the incoming and outgoing propagation directions. In this geometry it also equals the angle between the direction towards the Sun and the observer’s line of sight. θ = 0° denotes forward scattering; 180° denotes backward scattering.

For unpolarized incident light, the ideal Rayleigh phase function has equal values at 0° and 180°, and half that value at 90°. Its integral over the entire sphere is 1. This symmetry of a single event does not imply that the whole sky towards and away from the Sun has equal brightness.

Skylight must be accumulated along the entire line of sight, including local density, attenuation before scattering and attenuation on the way to the eye. Keep one elevation and turn through 0°, 90° and 180°, watching the three-dimensional scattering angle. The ray diagram is a projection; an angle measured on the drawing is not the physical θ.

PR(θ) = 3(1 + cos²θ) / (16π)

PR has units sr⁻¹ and θ is defined by three-dimensional propagation directions. This form assumes unpolarized light and does not track polarization. Values at 0°, 90° and 180° are approximately 0.119, 0.060 and 0.119 sr⁻¹.

Rayleigh phase function for unpolarized light

θ (°)PR(θ) (sr⁻¹)
00.119
900.060
1800.119

Optical depth and Beer–Lambert transmission

Optical depth τ adds up extinction along a path and has no units. The Beer–Lambert law gives the unscattered direct-beam transmission T = exp(−τ). For τ = 0, 1 and 2, T is 1, approximately 0.368 and approximately 0.135. This T excludes skylight scattered into the viewing direction from elsewhere.

βext is extinction per unit path length: km⁻¹ here, with ds in km, so their product is dimensionless. Molecular and aerosol densities decrease exponentially with altitude. A 100 km path in thin upper air therefore does not produce the extinction of a 100 km path near the ground.

The plane-parallel sec z approximation fails near the horizon. This lesson instead integrates between intersections with a spherical Earth of radius 6371 km and an atmospheric boundary at 100 km, checking Earth occultation first. Below the geometric horizon, ground-level direct sunlight is blocked. That does not mean all scattered skylight is gone.

τ(λ) = ∫ βext(λ, s) ds; T(λ) = exp(−τ(λ))

s increases along the path; βext(λ, s) = βsca + βabs. τ is dimensionless and T lies between 0 and 1. T is the fraction retained in the direct beam, not total transmission including scattered light.

Mie scattering, aerosols and cloud droplets

The size parameter x = 2πr/λ compares particle radius r with wavelength λ, expressed in the same length units. For x much smaller than 1, a Rayleigh approximation can apply. For comparable or larger particles, size, refractive index and absorption matter. Mie theory solves electromagnetic scattering by spheres and includes the Rayleigh limit for small particles.

Large particles often have strong forward scattering. A population of cloud droplets often has weaker visible-wavelength selectivity than air molecules, helping clouds appear white. Mie scattering does not mean uniform scattering in every direction or identical scattering at every wavelength. Multiple scattering, absorption and shadowing also affect thick clouds.

Haze increases the illustrative aerosol vertical optical depth at 550 nm from 0.03 to 0.20. A Henyey–Greenstein phase function with g = 0.75 approximates its forward peak; no size-resolved Mie calculation is performed. Aerosols can wash out, dim or recolour a sunset. More haze does not guarantee a redder sunset, and the display cannot be converted into PM2.5.

x = 2πr / λ

r is spherical particle radius, λ is wavelength and x is dimensionless. For r = 0.01 μm and λ = 0.5 μm, x ≈ 0.126; for r = 1 μm, x ≈ 12.57. Refractive index also affects the scattering.

Why high clouds can stay sunlit after sunset

Sunset at the observer means Earth blocks the direct solar ray there. An elevated cloud has a lower horizon and can remain illuminated while the ground is already in shadow, provided its own path to the Sun clears Earth. Each cloud must be tested at its own position; clouds in different directions need not darken together.

Choose Clouds after sunset: the Sun is at −1°, the ground is blocked, and cloud A at a fixed height of 8 km still receives sunlight. Keep the same bearing and lower the Sun to −4° to put A in Earth’s shadow. Turn to find other letters and check their individual illumination in the list. Turning the camera never moves the clouds.

For a cloud directly overhead at 8 km, spherical geometry alone gives an extra solar depression of arccos(6371/6379) ≈ 2.87°. The example clouds are not all overhead, so their shadow transitions differ. Warm cloud illumination comes from sunlight attenuated before reaching the cloud; its displayed material is an illustrative mixture, without cloud-interior multiple scattering or real cloud cover.

Multiple scattering and ozone in twilight

After sunset, upper air can remain illuminated and scatter light towards the ground, so the sky does not turn black at 0°. Solar-centre altitudes −6°, −12° and −18° define the lower boundaries of civil, nautical and astronomical twilight. They are observational conventions, not discontinuities in the sky’s spectrum or brightness.

A photon can scatter at one place and then another. Multiple scattering becomes increasingly important to visible skylight in deeper twilight. Ozone absorbs more than ultraviolet: its visible Chappuis bands can modify the spectrum along long atmospheric paths and contribute to twilight colour. Direction, aerosol distribution and ozone profiles all affect the result.

Twilight duration also depends on the angle at which the Sun crosses the horizon. The sunrise, sunset, latitude and axial-tilt lesson lets you change that geometry directly.

The numerical core here solves single scattering only, without full ozone absorption or multiple scattering. Continuous teaching colour anchors supplement the displayed twilight from −18° into daylight, with a fixed mapping that darkens as the Sun falls. This illustrates a process; it is not a local blue-hour forecast or a precision photometric model.

Human colour vision and the blue sky

The λ⁻⁴ dependence makes violet light scatter more strongly than blue, but perceived colour also depends on the incoming solar spectrum, atmospheric transmission and the overlapping spectral responses of three cone types. The visual system integrates the sky’s full spectrum, usually producing blue. The most strongly scattered wavelength alone does not determine a colour name.

It is incorrect to explain the lack of a violet-looking sky by saying all violet light is absorbed by the atmosphere. Violet may still be present, and its contribution must be considered with the other wavelengths. In dim twilight, rods and adaptation also influence perception; camera white balance and exposure further change photographs.

The three values at 450, 550 and 650 nm are relative direct transmissions, not measurements of display RGB. The sky uses a fixed display mapping and illustrative colours, without full-spectrum CIE integration, camera response or automatic exposure. Changing the website theme therefore does not recolour the natural sky itself.

What this model computes

Calculated: spherical geometry

Earth radius 6371 km, atmosphere boundary 100 km, fixed cloud height 8 km. Each incoming ray is tested for Earth occultation. The Sun is a point source; refraction and terrain are omitted.

Calculated: simplified Rayleigh and extinction

Molecular density has an 8 km scale height and vertical optical depth 0.10 at 550 nm. The model uses λ⁻⁴, the Rayleigh phase function and Beer–Lambert integration to accumulate relative single scattering.

Approximate: aerosols

Scale height 1.2 km; aerosol optical depth at 550 nm is 0.03 for clear air and 0.20 for haze. Ångström exponent 1, single-scattering albedo 0.9, HG g = 0.75. These are fixed teaching parameters, not local measurements.

Explanation only: full twilight physics

Multiple scattering and ozone Chappuis absorption affect twilight but are not solved here. Continuous teaching colour anchors supplement the display; this is not a complete radiative-transfer solution.

Illustrative: colour and cloud material

Three wavelengths feed a fixed RGB mapping and colour anchors. Cloud colour blends its incoming light with ambient colour. There is no full-spectrum colour integration, cloud-interior transport or camera exposure simulation.

Four skies, shared light-path principles

SceneMain mechanismComparisonInterpretation limit
Blue daylightMolecules scatter short wavelengths more stronglyChange bearing and elevation at fixed solar altitude4.35 is a coefficient ratio, not a sky colour ratio
Low SunA longer path removes more short-wave direct lightT at 45° and 3°Direct transmission is not skylight brightness
Clouds after sunsetElevated positions can still receive sunlightCloud A at −1° and −4°Each cloud is checked separately; material is illustrative
TwilightIlluminated upper air and scattering sustain skylightContinuous change from −9° to −18°Multiple scattering and ozone are not fully solved
FAQ

Why does the sky usually look blue?

Rayleigh scattering by air molecules redirects short wavelengths more strongly. The resulting spectrum is integrated by human cone responses and usually looks blue. Violet can still be present; it is not all absorbed away.

How do high clouds get sunlight after sunset?

Their horizon is lower, so the cloud-to-Sun path can still clear Earth. Each cloud’s position matters. In this example the ground is shadowed at −1°, while cloud A at 8 km remains illuminated.

Does more haze always make a redder sunset?

No. Particle size, absorption and distribution all affect the light. More haze can wash out, dim or obscure a sunset. The fixed haze example compares causes and does not forecast sunset colour or air quality.

Related tools: Sunrise & Sunset · Solar and Lunar Eclipses · How auroras form · Photography Golden Hour Planner

Sources and model scope

Scientific explanations draw on NOAA, USNO, optical literature and authors’ public materials. The interactive code, ray diagrams and teaching colours were made for this site. This is a relative single-scattering and spherical-occultation model, without full Mie size distributions, multiple scattering, ozone or physical colourimetry. It cannot replace observations, weather forecasts or photography planning.