A rainbow is comprised of seven different colors: green, blue, red, orange, indigo, yellow and purple. These colors are part of the basic spectrum that human eyes are able to perceive.
Sometimes the different colors blend with each other, making it difficult to see each color independently. A rainbow is created when drops of moisture in the air act like a prism, which refracts sunlight, allowing the seven different colors to exit the water droplets at different levels. Red is created when the angle difference between the sunlight entering and exiting is 42 degrees, a 40 degree difference produces purple, and so on.