The angle of refraction also depends on the wavelength of light. Visible light of different colors have different wavelengths and slightly different indices of refraction. The difference is so small that you don't see it when white light passes through a flat plate of glass for instance. But when white light passes through a prism and is refracted twice at the two surfaces, each color bends at a different angle and you can clearly see the separate colors.