Light is a wave. The colors of the rainbow from red to violet correspond to light of increasing frequency. The picture shows the colors of light with frequency increasing linearly with the x coordinate, except the colors are all brought closer to grayscale in an approximately perceptually uniform way to avoid any colors being too far away from grayscale to show up.