It may not be the colour they were hoping for, but Canada will still have the chance to fight for an Olympic medal in women’s soccer.

Canada lost 2-0 to Germany in Tuesday’s semifinal, and will now face Brazil in the bronze-medal match on Friday. Despite defeating the Germans 2-1 earlier in the Olympic tournament, the Canadian team couldn’t finish its scoring opportunities in the semifinal.

Germany's Annike Krahn controls the ball next to Canada's Sophie Schmidt, left, and Christine Sinclair during a semifinal match of the women's Olympic football tournament between Germany and Canada at the Mineirao Stadium in Belo Horizonte, Brazil, Tuesday, Aug. 16, 2016. (AP Photo/Leo Correa)

Germany’s Annike Krahn controls the ball next to Canada’s Sophie Schmidt, left, and Christine Sinclair during a semifinal match of the women’s Olympic football tournament between Germany and Canada at the Mineirao Stadium in Belo Horizonte, Brazil, Tuesday, Aug. 16, 2016. (AP Photo/Leo Correa)

“The players gave their best, but Germany took their chances and we didn’t,” said head coach John Herdman. “It is not the result we wanted, but I am so proud of my players.”

Canada was missing a pair of defenders in the game, as Allysha Chapman was injured and Josée Bélanger was suspended. That made the task of stopping Germany (ranked No. 2 in the world) all the more difficult.

“The back line was OK, they defended well,” said Herdman. “But this is football and we were playing against one of the best teams in the world.”

Christine Sinclair tries to get through two German defenders in an Olympic semifinal match for Canada on August 16, 2016.

Christine Sinclair tries to get through two German defenders in an Olympic semifinal match for Canada on August 16, 2016.

Things won’t get much easier in the bronze-medal game, as Canada will have to go up against not only one of the world’s top teams, but a loud hometown crowd.

“Playing against Brazil is always tough, as tough as Germany,” said Herdman. “They have a very passionate crowd, but I think we can bring that medal home.”

The team has been in this sort of situation before. Canada lost a heartbreaking semifinal against the United States at London 2012, but rebounded several days later to upset France and win bronze, the country’s first-ever medal in women’s soccer.

Sophie Schmidt (13) of Canada battles for a ball against Germany in the Olympic football semifinals on August 16, 2016.

Sophie Schmidt (13) of Canada battles for a ball against Germany in the Olympic football semifinals on August 16, 2016.

Likewise, at Rio 2016, the players will need to quickly overcome the disappointment of a semifinal loss and be at their best to close out the competition.

“It feels like crap now,” said midfielder Jessie Fleming. “We wanted a gold medal, but we have to change our mind quickly, and now we are going to win bronze.”