[Tex/LaTex] Beamer: change header background color

backgroundsbeamerbeamer-metropoliscolor

I have decided to switch from Powerpoint to Beamer, and for my first presentation I'd like to use the metropolis theme, and the same colors as in this goggle slide template:

Google slides theme.

I tried to do some research about it, the closest answers I found are the question Beamer how to change color of infolines and frame title and the beamer appearance cheat sheet. I tried this code:

\documentclass{beamer}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usetheme{metropolis}

\definecolor{bluegreen}{rgb}{3, 166, 155}
\definecolor{pitchblack}{rgb}{0, 0, 0}
\definecolor{lightbeige}{rgb}{255, 251, 241}
\definecolor{mediumgray}{rgb}{183, 183, 183}

\setbeamercolor{background canvas}{bg=pitchblack}
\setbeamercolor{normal text}{fg=lightbeige}
\setbeamercolor{headline}{bg=bluegreen, fg=mediumgray}

\begin{document}
\begin{frame}
    \frametitle{The title}
    Lorem ipsum...
\end{frame}
\end{document}

I does everything I want, except that the title bar's background color is lightbeige:

everything's fine, except the title bar background color

What did I do wrong? Or what argument should I pass to \setbeamercolor to get it right? Thanks in advance :-).

Best Answer

As Andrew Swann already said in his comment, you want to modify the frametitle colour and not the headline colour (as far as I can see, the metropolis theme does not have a headline).

The next problem is that you need RGB and not rgb in the colour definition - rgb would take values between 0 and 1.

\documentclass{beamer}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usetheme{metropolis}

\definecolor{bluegreen}{RGB}{3, 166, 155}
\definecolor{pitchblack}{RGB}{0, 0, 0}
\definecolor{lightbeige}{RGB}{255, 251, 241}
\definecolor{mediumgray}{RGB}{183, 183, 183}

\setbeamercolor{background canvas}{bg=pitchblack}
\setbeamercolor{normal text}{fg=lightbeige}
\setbeamercolor{frametitle}{bg=bluegreen, fg=mediumgray}

\begin{document}
\begin{frame}
    \frametitle{The title}
    Lorem ipsum...
\end{frame}
\end{document}

enter image description here