A ray of white light enters a glass prism and is refracted. Different colors of light are refracted by different angles, dispersing the white light into a visible spectrum on the screen. Violet light is refracted at the greatest angle and red light at the smallest angle, producing the rainbow of colors from red to violet in order of the letters in ROYGBIV. When sunlight passes through raindrops, the water droplets act as prisms and disperse the light into a rainbow through refraction.