The colors of the rainbow in order: ROYGBIV
From the outside of the arc to the inside, a rainbow runs red, orange, yellow, green, blue, indigo and violet. The initials spell ROYGBIV, and generations of British pupils learned the same order with “Richard Of York Gave Battle In Vain”. The tool above gives you the seven colors as a palette, always in that order, with a slightly different shade of each one every time you press Generate. Tap a band to copy its HEX code, or choose 3 to 6 colors to keep only part of the arc.
Why the order never changes
A rainbow is sunlight split by raindrops. Each drop bends the light as it enters, reflects it off its back and bends it again on the way out, and every wavelength bends by a slightly different amount. Red, the longest wave our eyes can see, at around 700 nanometers according to NASA, comes out at the widest angle, so it forms the outer band. Violet, the shortest at around 380 nanometers, forms the inner band. That is also why you only see a rainbow with the sun behind you. When a fainter second bow appears above the first, its colors are reversed, with red on the inside.
Seven colors, or six?
The spectrum is a smooth blend, so any count is a choice. Isaac Newton settled on seven, partly to echo the seven notes of a musical scale, and indigo has been argued about ever since: many people only see a deeper blue between blue and violet. The table below gives each color the typical shade our generator aims for, with its codes and how readable white text is on it. For the full circle of hues, see the color wheel; for each color’s opposite, the complementary colors.