Answer: Interestingly, we only need to look in three places in the Bible to discover the meaning of a rainbow and what certain colors may symbolize. These places to study are found in the books of Genesis, Ezekiel and Revelation.
In the Genesis account, a rainbow appears right after the great worldwide flood brought in order to remove sinful and evil-minded man from the earth. It symbolized God's mercy and the covenant He made with Noah (representing mankind) not to destroy the world in such a way again.
And God said, "This is the sign of the covenant which I make between Me and you and every living creature with you, for everlasting generations: I set My rainbow in the cloud, and it shall be the sign of the covenant between Me and the earth . . . and the waters shall no more become a flood to destroy all flesh. (Genesis 9:12, 15, HBFV).
In a way, a cloud which has the bow in it pictures God, as Exodus 13 states, "And the Lord went before them by day in a pillar of cloud to lead the way . . ." (Exodus 13:21).
In his first vision from God, known as the "wheel in the middle of a wheel" vision, the prophet Ezekiel compares the glory of God to what he saw. He states, "As the rainbow appears that is in the cloud in the day of rain, so was the appearance of His brightness all around" (Ezekiel 1:28).
Bows appear again in the prophetic book of Revelation, which foretell the end of man's rule on the earth and the coming of Jesus to set up his Kingdom. The first mention in Revelation appears when the apostle John uses it to describe the glory and power of God on his throne.
After these things I looked, and behold, a door opened in heaven . . . And He Who was sitting was in appearance like a jasper stone and a sardius stone; and a rainbow was around the throne . . . (Revelation 4:1, 3)
Then I saw another strong angel coming down out of heaven, clothed with a cloud, and with a rainbow on his head; and his face was like the sun, and his feet were like pillars of fire (Revelation 10:1).
The most common colors seen by the naked are, as listed by Isaac Newton: Red, Orange, Yellow, Green, Blue, Indigo, and Violet. In English, a popular way of remembering these colors is to memorize the name "ROY G. BIV." The primary colors are red, yellow, green, blue and violet.
Symbolism of colors
The rainbow colors red, purple (which is a mix of red and blue), and scarlet (a bright red) and crimson (a cooler hue of the color red) were used extensively in the tabernacle Moses made in the wilderness. They were also a part of the temple later constructed, and in the garments for the High Priest and other priests (Exodus 25:3 - 5, 36:8, 19, 27:16, 28:4 - 8, 39:1 - 2, etc.). These colors were types or shadows of atonement.
The colors purple and scarlet can mean or represent iniquity or sinfulness (Revelation 17:3 - 4, 18:16, etc.). Purple itself was used as a symbol of royalty (Judges 8:26). Scarlet by itself can represent prosperity (Proverbs 31:21, Lamentations 4:5).
The color blue, referred to directly or when scripture states something is like the appearance of a sapphire or sapphire stone, can be a symbol of deity or royalty (Numbers 4:5 - 12, Ezekiel 1:26, Esther 8:15, etc.).
Blue was also the color God commanded some threads in the fringes of Israelite garments be colored in order to remind them of the commandments and living a godly way of life (Numbers 15:38 - 39).
The color white found in a rainbow can mean holiness, righteousness and dedication to serving the true God (Leviticus 16:4, 2Chronicles 5:12, etc.). In vision, Jesus first appears to the apostle John with hair that is white (Revelation 1:12 - 14).
All believers throughout history who die in the faith will, according to the Bible, be resurrected and given white robes to wear (Revelation 7:13 - 14, 19:7 - 8).