 Triangular prisms are used to disperse light, that is, to break light up into its spectral components (the colors of the rainbow).Different wavelengths (colors) of light will be deflected by the prism at different angles, producing a spectrum on a detector (or seen through an eyepiece).This is a result of the prism's material (often, but not always, a glass) index of refraction varying with wavelength.