Why magenta sits outside the rainbow

A rainbow sorts visible light by wavelength. Each color in its arc corresponds to a range along one continuous spectrum: red lies at the long-wavelength end, violet at the short-wavelength end, and the colors between them mark the wavelengths in between. There is no wavelength beyond violet that loops around to red, so a rainbow has no magenta band.

How your eyes build the color

The retina has three kinds of cone cells, each most responsive to a broad range of wavelengths. Their signals overlap, and the brain compares their relative activity to interpret color. Light at the red end strongly stimulates one set of cones; light at the blue-violet end stimulates another. When both ends reach the eye together, with relatively less signal from the middle-responsive cones, the brain interprets the combination as magenta.

That is why magenta can appear on a screen or in paint even though it is not a single spectral color. A screen mixes red and blue light; pigments can absorb much of the middle wavelengths while reflecting more of the red and blue. In both cases, the eye receives a mixture that produces the characteristic perception.

A color made by comparison

Magenta is not imaginary: it is a real, consistent experience of color. But unlike a spectral hue such as green, it does not point to one place on the wavelength scale. Your visual system treats red and blue-violet signals as neighbors in color space, effectively joining the two ends of the spectrum in perception. The vivid result is a reminder that seeing color is not simply reading wavelengths off the world; the brain interprets patterns of light arriving at the eye.