The rainbow flag was originally designed in 1978 by Gilbert Baker, who dyed and sewed the fabric himself. The flag originally had eight colored stripes, whose meaning is describe above, and was premiered at the San Francisco Gay and Lesbian Freedom Day Parade that year. The following year, Baker attempted to have it mass produced, but discovered that his original eight colors could not be used; the hot pink was removed, and the indigo was replaced by royal blue.
Following the assassination of Harvey Milk, the San Francisco Pride Committee chose the flag to honor Milk and opted to remove the turquoise so that the flag could be evenly divided on the street along the parade route, with 3 colors on ones side and 3 on the other. It is this six-colored flag that has spread across the nation and is universally known and recognized as a symbol of gay pride & diversity. The colors of the flag were designed to symbolize: life (red), healing (orange), sunlight (yellow), nature (green), harmony (blue), and spirit (purple/violet).
Each of the parts of the LGBTQ community also have flags independent of the rainbow one. Each flag has colors have symbolic meaning to represent their community.