The reason is that the speed of violet light in glass is least while that of red light is most. Since. Referective index of glass = speed of light in air/speed of light in glass, so the refractive index of glass (the material of prism) is most for violet light and least for red light. Hence, the violet light is deviated most and red light is deviated least.