The way to separate colors is by using a prism. When white light passes through a prism, it refracts differently based on wavelength, causing it to separate into its constituent colors—red, orange, yellow, green, blue, indigo, and violet—forming a spectrum.