Rainbow imagery has a long history of symbolism. The Christians should have monopolized it as their own symbol of God’s promise, but they neglected to do that, so the enemies of righteousness hijacked it.
In Greek mythology, Iris, the messenger of the gods, traveled on the rainbow.
Since at least the late 15th Century, and the incorporation of the rainbow flag by the German theologian Thomas Müntzer in his reformist preachings, the symbol has been seized upon by religious and social activists to draw attention to their causes.
A version was unfurled in the 16th Century during the German Peasants’ War to signify the promise of social change.
In the 18th Century, the English-American revolutionary and author of the influential political tract Rights of Man, Thomas Paine, advocated for the adoption of the rainbow flag as a universal symbol for identifying neutral ships at sea.
The flag has since been flown by Buddhists in Sri Lanka in the late 19th Century as a unifying emblem of their faith, by Indians annually on 31 January to commemorate the passing of the spiritual leader Meher Baba, and by members of international peace movements.
The International Co-operative Alliance adopted it in 1925, and it's used by international peace movements (PACE flag) since 1961.
The song "Over the Rainbow" from The Wizard of Oz uses the rainbow as a symbol of dreams and a better place.
In its initial incarnation, Gilbert Baker’s homosexual rainbow flag consisted of eight colours – two more than the version now recognised internationally as an emblem for the LGBT community – and each colour was assigned a symbolic meaning. A band of hot pink (representing sexuality) ran across the top of the flag in the original scheme, followed by red (which stood for life), then by orange (for healing), yellow (sunlight), green (nature), turquoise (magic), indigo (serenity), and violet (spirit) at the bottom.
Displayed for the first time in the United Nations Plaza in downtown San Francisco in June 1978, this eight-striped version was produced by a team of 30 volunteers commandeering the washing machines of a public laundromat in order to rinse the dye from the fabric and the wide attic space of a gay community centre, where the individual strips were ironed and sewn together.