A rainbow is an optical phenomenon produced by the refraction, internal reflection, and dispersion of sunlight within water droplets suspended in the atmosphere. The classic primary rainbow displays colours from red (outer, 42°) to violet (inner, 40°) — a result of different wavelengths of light being refracted at slightly different angles. The sun must be behind the observer and rain (or spray) in front, with the rainbow centred on the antisolar point (directly opposite the sun).
A secondary rainbow — fainter and with reversed colour order (red inside, violet outside) — sometimes appears outside the primary bow at about 51°. It results from two internal reflections inside each droplet (versus one for the primary). The dark region between the primary and secondary bows is called Alexander's dark band, named after Alexander of Aphrodisias who described it in 200 AD. Rarer phenomena include supernumerary bows (interference fringes inside the primary), fog bows (white bows in fog with very small droplets), and lunar rainbows (moonbows — faint, usually appearing white to the naked eye).
Rainbows are not physical objects at a fixed location — each observer sees their own personal rainbow determined by the geometry between sun, droplets, and eyes. You can never reach the "end" of a rainbow; it moves with you. From an aircraft, rainbows appear as complete circles. The angular size depends on droplet size: large drops (1–2 mm) produce vivid, narrow bows, while small drops (<0.5 mm) produce broader, paler bows. René Descartes first correctly explained the rainbow's geometry in 1637, and Isaac Newton identified the colour dispersion mechanism in 1672.