white lgiht made up of 7 colour and all have different wavelengths. Refractive index of a medium is dependent on the wavelength of light. According to snell's law,
As μ is different for different wavelengths, r is different too, and hence each wavelength is deviated by a different amount. This leads to the splitting of colours in white light. finaly VIBGYOR colour pattern apper.