Talk about going from one extreme to the other while facing adversity.

Last Sunday, New York City FC looked like a bottom-of-the-table MLS team as it was run out of Red Bull Arena in a distressing loss to the Red Bulls.

Yesterday, the soccer shoe wound up on the other foot, though City was far from being at full strength. With captain and league-leading goal-scorer David Villa, two defenders and coach Patrick Vieira suspended, the hosts looked like world beaters in its stunning 5-1 triumph over the 10-man Colorado Rapids at Yankee Stadium.

English midfielder Frank Lampard had the first hat trick in club history as City (10-7-6, 36 points) solidified its spot atop the Eastern Conference.

“From start to finish, a great team performance,” Lampard said, who scored against a team that had allowed 14 goals entering the match and vs. U.S. international goalkeeper and 2014 World Cup hero Tim Howard.

advertisement | advertise on newsday

After last week’s fiasco, City demonstrated its resilience. “That’s what a team at the top of the table needs to do,” Lampard said.

Vieira, who watched from a suite while assistant Christian Lattanzio ran the show, was unavailable for comment. He probably was proud his team snapped Colorado’s (10-3-8, 38 points) 15-game unbeaten streak in such striking fashion.

With Villa serving a yellow-card suspension, Lampard, an English Premier League and World Cup veteran, took over the Spaniard’s captain responsibilities.

“It’s important for all the players show their leadership,” he said. “I tried to use the experience to help today.”

He also assumed Villa’s scoring duties in spectacular fashion. Lampard scored off a sliding 4-yard shot (28th minute), from 18 yards (81st minute) and a penalty kick (84th minute).

@NewsdaySports

City was helped that Colorado was forced to play the final 53 minutes a man down after Micheal Azira accrued his second yellow card in the 37th minute before a crowd of 25,711.

Tony Taylor, playing for Villa, tallied in the 42nd minute, 13 minutes after the game resumed from a 35-minute delay because of severe weather. Substitute Steven Mendoza added a 75th-minute score. With fullbacks Ethan White and RJ Allen suspended, Diego Martinez and Jason Hernandez were solid.

“It shows the depth, it shows the unity,” Lampard said. “More than anything it shows a lot of those individuals who are sometimes not playing, but they are keeping fit and they are contributing when they play.”