When white light passes through a dispersive medium say prism, it splits into its constituent colours. This is known as dispersion. The reason for dispersion is that in a material medium the light rays of different colours travel with different speeds. Hence, refractive index n is different for different colours. n= speed of light in medium speed of light in vacuum
In glass speed of violet light is minimum while that of red light is maximum.