Simulation of Dispersion of Light by a Prism. The refractive index varies for different wavelengths of light. Blue light is refracted more than red light. This causes the different coloured light beams hitting the prism to emerge at slightly different angles. When white light (e.g. sunlight) hits a prism, the colours are split yielding a spectrum (rainbow of colours). The amount of dispersion varies with different materials. In optics, combinations of lenses with different dispersive qualities can help prevent chromatic aberration. See the related Rotating Prism Animation.