Gilbert Baker, the coloUrful gay artist and activist who created the iconic rainbow flag, has died.

Mr. Baker's first flag was an eight-coloUred banner that flew over the 1978 Pride festivities in San Francisco. The rainbow flag has since become a symbol of the LGBT community recognised worldwide—celebrated at pride festivals, brandished at protests and raised every morning at the corner of Castro and Market streets.

Friends said Mr. Baker, 65, died Thursday in his sleep at his home in New York.

Mr. Baker, a former U.S. Army soldier who taught himself to sew, proposed the rainbow flag at a time when San Francisco's gay and lesbian community was struggling to find a symbol to unite under. He personally rejected other ideas: the pink triangle, a Nazi badge reclaimed by gay activists that Mr. Baker found depressing, and the Greek letter lambda, which he deemed too obscure.

The rainbow was joyful, celebratory and inclusive. And it was relatively easy to make—and share.

"That day when he raised the first rainbow flag, he knew that was his life's work. And for every march, every protest, every celebration, every memorial, he was always sewing and sewing and sewing," said Cleve Jones, a longtime San Francisco gay activist and friend of Mr. Baker's who helped him hand-dye the fabric for that first flag.

"I take some comfort in knowing that he will be remembered. For generations to come, people will know that flag," Jones said. "It's an example of how one person can have an amazing and brilliant idea that reaches not just millions, but hundreds of millions of people."

Mr. Baker's first flag was eight solid stripes; within a year, he had agreed to drop two colors — pink and turquoise — largely because fabrics and dyes in those shades weren't always readily available. The six-colour flag — red, orange, yellow, green, blue and purple—is what is recognised globally now.

Mr. Baker replicated his flag dozens of times over the years. He crafted a mile-long banner to parade down Fifth Avenue in Manhattan, and he sent flags around the world in support of gay rights protests. He sewed the rainbow flag used in the movie "Milk," along with a new flag for this year's television miniseries "When We Rise."

"I remember the most fabulous queen I'd ever seen in my life shows up in sequins with a sewing machine in his arms, and he insisted on creating that flag exactly the same way he'd created it then," said Dustin Lance Black, who wrote "Milk" and wrote and directed "When We Rise," which was based on Jones' memoir of the same name.

"He inspired you with his passion and his joy to come together," Black said. "That was always his thing, how do we bring each other together. That's partly why it's so painful to lose a force like him now, when we're living in such divided times. He made us truly a family, and gave us a symbol of hope and pride."

According to his online biography, Mr. Baker was born in Kansas in 1951 and joined the U.S. Army in 1970. His story as a soldier is told in the book "Conduct Unbecoming," by former Chronicle staff writer Randy Shilts, about gays and lesbians in the U.S. military.

Mr. Baker was stationed in San Francisco just as the gay civil rights movement was taking off in the city, and so when he was honourably discharged in 1972, he stayed put. He went to work making banners for gay and antiwar demonstrations, some for his friend Harvey Milk, San Francisco's first openly gay supervisor.

Milk marched under Mr. Baker's first rainbow flag in the June 1978 San Francisco Gay Freedom parade, just months before he was assassinated.

Mr. Baker continued to create banners for other causes and events. Just a few weeks ago, he met with Supervisor Jeff Sheehy in his City Hall office to talk over ideas for Sheehy's float in this year's Pride Parade.

"Gilbert was our own Betsy Ross," said Sheehy, who worked with Mr. Baker repeatedly in the 1990s on political causes. "He was a genius at political theater, at political art. He's one of these heroes who never sought attention for himself. But he was relentless."

Mr. Baker was flamboyant and outspoken, a lover of high heels, drama and anything that sparkled, friends said. He was an early member of the Sisters of Perpetual Indulgence, the drag queen charity and protest group, and he had a well-known fondness for wicked humor.

"Nobody could make me laugh like Gilbert," Jones said.

Mr. Baker never made money off of his creation, Jones said. Not long after the first flag went up, "I told him he'd better patent it, and he said, 'No, it's my gift to the world,'" Jones recalled. "And I said, 'Girl, you're going to regret that.'" But he never did, Jones said.

The flag design may seem simple, and obviously ubiquitous, now, but it came from a creative mind, and from a man deeply connected with his hippie, psychedelic roots, said Tom Taylor, who met Mr. Baker not long after he made the first flag and who is now the "keeper of the flag" in the Castro. Taylor raises and lowers the 40- by 20-foot banner every day.

Mr. Baker attached meanings to every colour on the flag, and he personally campaigned for his design all around the city before the San Francisco LGBT community fully embraced it, Taylor said.

"Gilbert's presence in the world will never be forgotten," said Jerome Goldstein, who married Taylor in a ceremony officiated by Mr. Baker four years ago.

"HIV disease may someday be forgotten, all of the ugly political and religious fights that we've had, they may be forgotten," Goldstein said. "But the rainbow flag will endure forever."

A candlelight vigil was held Friday night at Castro and Market streets, beneath his flag.

From: Esquire US