A rainbow is just spreading out the different wavelengths (colors) of white light.