There are seven visible colors of the rainbow: red, orange, yellow, green, blue, indigo and violet. Colors in the rainbow that are invisible to the human eye include infrared and ultraviolet.
A mnemonic used to remember the seven colors of the rainbow is "Richard of York gave battle in vain." Using the initial letter of each word, Richard represents red, of represents orange, York represents yellow, gave represents green, battle represents blue, in represents indigo and vain represents violet.
Rainbows always appear in the segment of sky that is directly opposite the sun. A rainbow occurs when sunlight is refracted and reflected by water droplets. The light from the sun is refracted when it enters a droplet of water. It is then reflected off the back of the water droplet before being refracted once more when leaving the droplet, resulting in the spectrum of colors in sunlight becoming visible to the naked eye. In a primary rainbow, red is on the outer edge of the arc, and violet is on the inner edge. In a double rainbow the light is reflected twice before leaving the raindrop, which results in a second arc being visible outside of the primary arc. In the secondary arc, colors are reversed.