The phenomenon known as the dispersion of light is the effect where white light splits into its distinct constituent colours when passing through a transparent medium, such as a prism.
This happens because each colour (wavelength) of light is refracted at a slightly different angle. Violet light, having a shorter wavelength, bends the most, while red light, with its longer wavelength, bends the least.
Sir Isaac Newton conducted pivotal experiments in 1666 that demonstrated this principle. He showed that white light could be separated into a spectrum of colours using a prism, and later proved that these colours could be recombined to form white light again.
Newton's work established that the visible spectrum consists of seven colours: red, orange, yellow, green, blue, indigo, and violet.