When white light is passed through a triangular prism of a material denser than air (say glass), dispersion occurs. For example, you can ask for the refractive index of glass or air or water. Refractive index depends upon the wavelength of light. Light with the least wavelength is refracted the most (violet - maximum refractive index while the light with the maximum wavelength is refracted the least (red - least refractive index). Red light has a longer wavelength than violet light. The refractive index of a red light in glass is slightly different than for violet light. Violet light slows down even more than red light, so it is refracted at a slightly greater angle.