HOW THE RAINBOW IS FORMED
Light comes from behind you and hits the droplet, which acts like a prism. Light comes in, hits the raindrop, the light is refracted (bent) and then dispersed. The light is then reflected from off the back of the raindrop and once again refracted upon exit. The difference in angles accounts for the difference in the colors you see. Red makes an angle of 42° from where it entered and blue makes and angle of 40.6°. The other colors are angles in between these two.