RoyGBiv is an mnemonic that uses the first letter of each of these colors: red, orange, yellow, green, blue, indigo, violet in order of the color spectrum. It is pronounced as if it were a name: "Roy G. Biv". Red is the color of lowest energy and violet is the highest-energy color. In RoyGBiv, the colors are arranged in the order of decreasing wavelengths, with red being 650 nm and violet being about 400 nm.
Some debate exists over whether indigo is distinct from blue and violet on the color spectrum.
The reason for the "seven" colors is that when they were named from the results of the spectrum thrown by a prism, seven was considered to be a holy number, dating to the seven observable (non-star) objects in the heavens (the sun, the moon, and the five planets visible to the naked eye).