TintShelf
Interface

Colors of the rainbow in order

What are the colors of the rainbow in order?

Red, orange, yellow, green, blue, indigo and violet, from the outer edge of the bow to the inner. The initials spell ROYGBIV, also remembered as Roy G. Biv or Richard Of York Gave Battle In Vain.

Why does the rainbow have seven colors?

Because Isaac Newton chose seven. He first named five colors and later added orange and indigo to match the seven notes of the major scale. A rainbow is a continuous spread of light, so the number of colors in the rainbow is a convention, not a measurement; the rainbow order itself never changes.

What wavelengths are the rainbow colors?

The eye responds to light from about 380 to about 750 nanometres. Typical bands are violet 380 to 450 nm, blue 450 to 485, cyan 485 to 500, green 500 to 565, yellow 565 to 590, orange 590 to 625 and red 625 to 750. Indigo has no band of its own in that table, and the Munsell color system of 1905 names only five principal hues: red, yellow, green, blue and purple.

Screens cannot show pure spectral light, so the hex codes below are the CSS color keywords with the same names: the standard way to write rainbow colors in code, not measurements of a real rainbow.

Rainbow colors in order, with hex codes

ColorHEXRGBWavelength
Red#FF0000rgb(255, 0, 0)625–750 nm
Orange#FFA500rgb(255, 165, 0)590–625 nm
Yellow#FFFF00rgb(255, 255, 0)565–590 nm
Green#008000rgb(0, 128, 0)500–565 nm
Blue#0000FFrgb(0, 0, 255)450–485 nm
Indigo#4B0082rgb(75, 0, 130)no band of its own
Violet#EE82EErgb(238, 130, 238)380–450 nm

Rainbow gradient in CSS

background: linear-gradient(90deg, #FF0000, #FFA500, #FFFF00, #008000, #0000FF, #4B0082, #EE82EE);

Screens show the same code differently, and print adds more variation. CMYK here is the plain formula without a printer profile, so use it as a starting point, not a press value. Contrast numbers follow WCAG 2.x.