A rainbow is formed when sunlight is refracted by spherical water droplets in the atmosphere; two refractions and one reflection, combined with the chromatic dispersion of water, produce the primary arcs of colour.