The sun's light is white, but white is actually a mix of red, orange, yellow, green, blue, indigo, and violet, in the light, though if you were to mix them you would get black. Anyway, the way the colors are formed is that the white light Goes onto a raindrop, causing all the colors of the spectrum to seperate.