What is happening?
White light, like sunlight, is a mix of many colours. When light passes from air into glass it slows down, and it changes direction at the surface. This bending is called refraction.
Each colour slows down by a slightly different amount, so each one bends by a slightly different amount. That splitting into colours is called dispersion. In a prism the two faces are tilted towards each other, so the bend at the second face adds to the first and the colours fan out.
In the NCERT Class 10 science book (CBSE), this is the "dispersion of white light by a glass prism" in the chapter The Human Eye and the Colourful World.
Why red bends least
Glass slows violet light a little more than red light. A bigger slow-down means a bigger bend, so violet turns the most and red the least, with orange, yellow, green and blue in between. The difference is small: for ordinary crown glass it is about one and a half degrees between red and violet in a 60° prism.
Newton's experiment
Isaac Newton began experimenting with prisms in 1666 and published his results in 1672. He let a thin beam of sunlight into a dark room and through a prism, and saw a long band of colours on the far wall. When he passed just one colour through a second prism, it bent again but did not change colour. And a second prism turned the other way could mix the colours back into white. So the colours were in the white light all along; the prism only separates them.
Why flint glass spreads colours more
Flint glass, traditionally made with lead, slows light more than ordinary crown glass, and it slows the colours by more different amounts. So it bends light further and fans the colours out much more; switch the material above and compare the real spread. Lens makers pair crown and flint glass so the colour spreading of one cancels the other's.
Rainbows are the same idea
A raindrop acts like a tiny prism with a mirror at the back. Sunlight bends going into the drop, reflects off the back and bends again coming out. Water slows the colours by different amounts too, so they fan out, and you see red on the outside of the bow and violet on the inside.
Show the maths
Refractive index for each colour, using Cauchy's formula: n(λ) = A + B / λ², with λ (wavelength) in micrometres. Values used here, fitted to each material's published index at 587.6 nm and its Abbe number (a measure of how much it spreads colour):
- Crown glass (Schott BK7): A = 1.5046, B = 0.00420
- Dense flint glass (Schott SF10): A = 1.6894, B = 0.01342
- Water at about 20 °C: A = 1.3239, B = 0.00313
Snell's law at each face, with angles measured from the normal and A the top angle: sin i = n sin r₁, r₂ = A − r₁, n sin r₂ = sin e. Deviation δ = i + e − A. If n sin r₂ > 1 there is no way out: total internal reflection.
Minimum deviation happens when r₁ = r₂ = A/2, giving n = sin((A + δmin)/2) / sin(A/2). For BK7 at 589 nm in a 60° prism that is about 38.6°.