A light ray is refracted (bent) when it passes from one medium to another at an angle and its speed changes. At the interface, it is bent in one direction if the material it enters is denser (when light slows down) and in the OTHER direction if the material is less dense (when light speeds up). Because different wavelengths (colors) of light travel through a medium at different speeds, the amount of bending is different for different wavelengths. Violet is bent the most and red the least because violet light has a shorter wavelength, and short wavelengths travel more slowly through a medium than longer ones do. Because white light is made up of ALL visible wavelengths, its colors can be separated (dispersed) by this difference in behavior. White light is combination of seven colors.But blue light does not have any components.That is why blue light remains the same and white light get dispersed.