Rainbows seem almost magical, but they follow simple rules of light. You need just two things: sunlight behind you and raindrops in front of you.
Raindrops act like tiny prisms
When sunlight enters a raindrop, it slows down and bends. This bending is called refraction. Each colour bends by a slightly different amount: violet the most, red the least. So the white light spreads out into its separate colours.
The light then reflects off the back of the drop and bends again as it leaves, spreading the colours even further.
Why rainbows are curved
Light leaves each raindrop at a particular angle, about 42 degrees for red light, measured from the point directly opposite the Sun. All the drops sending light to your eyes at that angle form a circle around that point. Usually the ground hides the bottom half, so we see an arc. From an aeroplane, you can sometimes see a complete circular rainbow.
The order of colours
The colours always appear in the same order: red on the outside, then orange, yellow, green, blue, indigo and violet on the inside.
Double rainbows
Sometimes light reflects twice inside the raindrops. This creates a fainter second rainbow outside the first, with its colours in reverse order. The darker band of sky between the two is called Alexander’s band.
No two people see the same rainbow
Because a rainbow depends on the angle between the Sun, the drops and your eyes, every person sees light from a slightly different set of raindrops. In a sense, everyone sees their own rainbow, and you can never reach its end.