You can break up white light into its rainbow of colors using a prism to disperse the light rays.
So the rainbow is actually a result of the properties of light (refraction and dispersion) that God created on day one of creation week, when he said, “Let there be light” (Genesis 1:3).
He obviously created the entire electromagnetic spectrum, of which visible light is just a part.
Now our eyes are designed to see seven colors with specific wavelengths divided out of visible light—red, orange, yellow, green, blue, indigo, and violet.
Of course, there are many other visible colors made by mixing various combinations of these colors—such as pink, which can be made with the right mix of red and blue wavelengths. And if we consider all frequencies, there are as many colors (invisible to us) as the stars in the universe. But the true rainbow has seven colors. God invented the rainbow."
Ken Ham
