A white beam enters the prism and fans into a spectrum because each colour has its own refractive index. Drag the apex angle A, angle of incidence i, mean index nd and Abbe number Vd and watch violet always deviate more than red.
Angular dispersion violet - red
1.56°
Spectrum emerges — violet deviates most.
Per-colour trace
n (red, 680 nm)1.5166
n (violet, 410 nm)1.5343
Deviation of red38.65°
Deviation of violet40.21°
Prism apex angle A60°
Angle of incidence i50°
Mean index nd1.52
Abbe number Vd58
Colour model: Cauchy n = Ac + B/(wavelength)², fitted from nd and Vd at the 656.3 / 587.6 / 486.1 nm lines. Snell's law is solved at both faces; the fan between red and violet is drawn 4x wider than life so you can see it.
Tip: lower the Abbe number to make the glass more dispersive and the spectrum wider — then push A or nd up until violet stops emerging (total internal reflection).