A rainbow is formed when sunlight is refracted, or bent, as it enters a raindrop. The light is then reflected off the inside surface of the droplet and refracted again as it exits and returns to the air
magicexhibit.org. This process splits the light into its constituent colors: red, orange, yellow, green, blue, indigo, and violet. The result is a circular arc of colors that appears in the sky opposite the sun.