Why does white light split into colours?
The science
Snell's law: n₁ sin θ₁ = n₂ sin θ₂. Here n₁ = 1 (air, approximate), n₂(λ) = 1.333 + D × 0.004 × (550/λ − 1), an illustrative dispersion approximation, not measured water data. θ₂ = asin(sin θ₁ / n₂). Values are calculated live from this model.
Real rainbows form by refraction, internal reflection, and another refraction in spherical water droplets. The prism-like glass shape shown is an educational visual metaphor; its outgoing ray paths are stylised, and the numeric readout describes only the first air-to-water refraction. A real primary rainbow is viewed about 40–42° from the antisolar direction, depending on colour and conditions. Not to scale.