This causes light of different colors to be refracted differently and to leave the prism<span> at different angles, creating an effect similar to a rainbow. This can be used to separate a beam of white light into its constituent spectrum of colors.</span>