As the sun set on Washington on Tuesday evening, a rainbow appeared over the Capitol. LGBTQ candidates and advocates hoped it was an early sign that a figurative “rainbow wave” would sweep a historic number of lesbian, bisexual, transgender and queer candidates into office.

Their hopes were arguably fulfilled. With a number of races still too close to call, more than 150 LGBTQ candidates emerged victorious in the midterms as of Friday afternoon. For perspective, there are currently less than 600 openly LGBTQ elected officials in the U.S. — just 0.1 percent of elected officials nationwide, according to the Victory Institute.

“From the U.S. Congress to governors’ mansions to state legislatures and city councils, we are making historic inroads and growing our political power in ways unimaginable even a few years ago,” former Houston Mayor Annise Parker, now the president and CEO of the Victory Institute and Victory Fund, said in a statement sent to NBC News. “We shattered lavender ceilings, achieved historic firsts and brought more LGBTQ representation to legislative bodies across the nation, which will help push equality forward.”

GOVERNOR’S RACES

Four LGBTQ candidates ran for governor, all Democrats, and two are projected to win.

In Colorado, with 99 percent of the votes in as of Friday afternoon, NBC News reported that Jared Polis is ahead of his Republican challenger, Walker Stapleton, with more than 52 percent for the vote. Polis is set to become the first openly gay man elected governor in the U.S.

Patrick Egan, a politics professor at New York University, called Polis’ victory a “remarkable turnaround” for the Centennial State, which in 1992 “was home of Amendment 2,” which prohibited recognition of homosexuals as a protected class. And just over a decade ago, the state also passed Amendment 43, which prohibited same-sex marriage.

“That says something about the transformation of that state, and of our country, when it comes to how voters think about LGBTQ candidates and LGBTQ rights,” Egan said.

Oregon Gov. Kate Brown, a bisexual Democrat who in 2016 became the first openly LGBTQ person to be elected governor, was also projected to win her race. With 99 percent of the vote in on Wednesday afternoon, Brown was 6 percentage points ahead of Republican Knute Buehler.

Lupe Valdez, a lesbian Latina running in Texas, and Christine Hallquist, a transgender woman running in Vermont, were both projected to be defeated by their Republican challengers.

“The big disappointment of the night is Christine Hallquist,” Egan said, noting that she faced a popular Republican incumbent, Gov. Phil Scott. “But I don't think it takes anything anyway from her historic candidacy.”

CONGRESSIONAL RACES

There are currently seven openly LGBTQ members in Congress: Sen. Tammy Baldwin, D-Wis.; Rep. Jared Polis, D-Colo.; Rep. David Cicilline, D-R.I.; Rep. Sean Patrick Maloney, D-N.Y.; Rep. Kyrsten Sinema, D-Ariz.; Rep. Mark Pocan, D-Wis.; and Rep. Mark Takano, D-Calif.

The incoming 116th Congress will welcome several new LGBTQ members, though the overall number of out members will only increase slightly, as some members — like Polis — have sought higher office.

Baldwin, the first openly LGBTQ person elected to the Senate, was projected to win re-election. Sinema, who is running for the Senate seat being vacated by Republican Jeff Flake, is in a tight race with Republican Martha McSally. As of Friday afternoon, the race was still too close to call: With 83 percent of precincts reporting, Sinema was ahead by nearly 10,000 votes. If she wins, she will be the first openly bisexual person elected to the Senate and the first female senator from Arizona.

Of the estimated 20 openly LGBTQ major party candidates running for the House, eight won. The incumbent winners include Rep. Mark Takano, D-Calif.; Rep. Sean Patrick Maloney, D-N.Y.; Rep. David Cicilline, D-R.I.; and Rep. Mark Pocan, D-Wis. The new LGBTQ House members include Democrats Sharice Davids of Kansas, Angie Craig of Minnesota, Chris Pappas of New Hampshire and Katie Hill of California.

When all the races are called, the number of LGBTQ members in both houses of Congress will climb slightly to nine.

“This is a historic night in the fight for equality,” Rep. Cicilline said in a statement. “We will enter the 116th Congress with an unprecedented number of LGBTQ members.”

“We are also celebrating the rise of a Democratic majority,” Cicilline continued. “Issues important to LGBTQ Americans, like the Equality Act’s protection from discrimination and equal and affordable access to health care, will now be top priorities for the People’s House. The LGBTQ members of Congress are ready to lead in the House to ensure equality for all across this country.”

The wins by LGBTQ challengers helped give control of the House to Democrats. Democrats needed to pick up 23 seats to take control of the House, and as of Thursday, they had a net gain of 31.

Pappas won his race by a landslide to hold a Democratic seat and represent New Hampshire’s 1st Congressional District, a district Trump won by 2 percentage points. With the win, Pappas becomes the first openly gay person to represent New Hampshire in Congress.

Democrat Sharice Davids flipped her district in Kansas against four-term incumbent Republican Kevin Yoder to become the first openly LGBTQ member of Congress from Kansas and one of the first two female Native Americans elected to Congress (along with newly elected Debra Haaland, Democrat of New Mexico).

“Tonight Kansas voters gave the boot to a Trump ally and replaced him with a groundbreaking LGBTQ leader who spoke her truth throughout the campaign,” former Houston Mayor Annise Parker, now the president and CEO of the LGBTQ Victory Fund, said in a statement sent to NBC News. “Sharice’s victory tonight will become a model for other LGBTQ leaders considering a run for office in red states or districts.”

Likewise, Angie Craig of Minnesota beat incumbent Rep. Jason Lewis, picking up an important seat for the Democrats. She also will be the first openly LGBTQ mother in Congress.

“Angie’s victory is a historic moment that redefines what is possible for an LGBTQ person in Minnesota, and it is made even sweeter given she defeated one of the most homophobic and transphobic incumbents in the U.S. Congress to pull it off,” Parker said.

NBC News declared Katie Hill the apparent winner in her race for California’s 25th District. With nearly all districts reporting, Hill had a nearly 3-point lead over her opponent, incumbent Republican Steve Knight as of Friday afternoon.

STATE AND LOCAL RACES

State legislatures across the U.S. will elect a record-breaking number of LGBTQ representatives, according to Andrew Reynolds, professor of political science at University of North Carolina, Chapel Hill. There have never been more than 119 openly LGBTQ state representatives nationwide, but with 32 newly elected legislators as of Wednesday, the total will hit 129, according to Reynolds.

There were also several notable firsts in statehouses across the country. Kansas, Nebraska and Indiana will welcome the first-ever LGBTQ legislators.

In Kansas, Susan Ruiz and Brandon Woodard won seats in the Kansas House of Representatives. In Nebraska, Megan Hunt became the first openly LGBTQ candidate ever elected to the state legislature, and J.D. Ford defeated Republican Mike Delph, a staunch opponent of same-sex marriage, to become the first LGBTQ candidate elected to Indiana’s General Assembly.

Neil Rafferty won his race in the Alabama House of Representatives, Mary Washington will become the first only LGBTQ person of color elected to the Maryland Senate, and Malcolm Kenyatta is the first openly gay black man to win a seat in the Pennsylvania legislature.

“The rainbow wave touched down in state capitals throughout the country on Election Day — with an astounding number of out LGBTQ candidates shattering long-standing political barriers and becoming historic firsts,” Parker said.

“While our attention is often focused on Donald Trump and Congress, it is in our state legislatures where the most horrific attacks on LGBTQ equality are occurring. But personal relationships matter in these legislative chambers, and we know out LGBTQ officials significantly influence the votes of their colleagues on equality issues.”

State-level representation matters because of the number of anti-LGBTQ bills that have been introduced in the past several years. In 2017, 129 anti-LGBTQ bills were introduced across 30 states, according to the Human Rights Campaign, 12 of which became law.

Two transgender women, Lisa Bunker and Gerri Cannon, also won their elections in New Hampshire, effectively tripling the level of transgender representation in statehouses across the U.S. Danica Roem, who in 2017 became the first transgender person elected to a state legislature, congratulated both Bunker and Cannon.

And congratulations to New Hampshire state Rep.-elect @LisaBunker too!

There will now three out-and-seated transgender state legislators in the United States soon with NH state Rep.-elect @GerriCannon in the winner’s circle too! https://t.co/TVE7OpoNNX — Danica Roem (@pwcdanica) November 7, 2018

There are still more transgender candidates running in statehouse races that have yet to be decided, according to researcher Logan Casey, who tracks transgender political candidates nationally. These candidates include Everett Maroon of Washington, Amelia Marquez of Montana, Briana Titone of Colorado and Lasia Casil in Guam. A number of transgender candidates were also successful in local races for city council and school board.

Egan said that candidates’ LGBTQ identities were not a significant issue in any of the races.

“The dog that didn't bark is definitely something of note, and that’s definitely something good about 2018 and where we stand on these things,” he said.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM