There are seven colors in a rainbow: red, orange, yellow, green, blue, indigo and violet. The acronym ROYGBIV, pronounced "Roy G. Biv," is a popular mnemonic to remember the colors in order.
A rainbow is formed when white light, such as sunlight, is bent through a prism or through water droplets suspended in the air. The prism or water causes light to separate by wavelength, because light of longer wavelengths such as indigo and violet bends more than light of shorter wavelengths. If a rainbow is passed through a second prism, the separated light can be re-combined into white light.