Use of the rainbow flag by the gay community began in 1978 when it first appeared in the San Francisco Gay and Lesbian Freedom Day Parade. Borrowing symbolism from the hippie movement and black civil rights groups, San Francisco artist Gilbert Baker designed the rainbow flag in response to a need for a symbol that could be used year after year. Baker and thirty volunteers hand-stitched and hand-dyed two huge prototype flags for the parade. The flags had eight stripes, each color representing a component of the community: hot pink for sex, red for life, orange for healing, yellow for sun, green for nature, turquoise for art, indigo for harmony, and violet for spirit.
The next year Baker approached San Francisco Paramount Flag Company to mass-produce rainbow flags for the 1979 parade. Due to production constraints -- such as the fact that hot pink was not a commercially-available color -- pink and turquoise were removed from the design, and royal blue replaced indigo. This six-color version spread from San Francisco to other cities, and soon became the widely-known symbol of gay pride and diversity it is today. It is even officially recognized by the International Congress of Flag Makers. In 1994, a huge 30-foot-wide by one-mile-long rainbow flag was carried by 10,000 people in New York's Stonewall 25 Parade.
The rainbow flag has inspired a wide variety of related symbols, such as freedom rings and other accessories. There are plenty of variations of the flag, including versions with a blue field of stars reminiscent of the American Stars and Stripes and versions with superimposed lambdas, pink triangles, or other symbols.