How refraction forms a Rainbow

using light beams

How its possible

If you have a prisim and white light shines through it. Refraction happens which is the bending of the light through the prism and what comes out is multible colors. the colors are red, orange, yellow, green, blue, indigo, and violet. And they create a rainbow.
Dispersion Of White Light