[Tex/LaTex] Modifying block environment in beamer

beamerbeamer-metropolis

I have problems modifying the block environments in the metroplis theme.

The follwing example renders as

        \documentclass[10pt,xcolor=dvipsnames]{beamer}
        \usetheme{metropolis}

        \begin{document}

        \begin{frame}
           \begin{alertblock}{Title}
              Inhalt...
           \end{alertblock}

        \end{frame}

        \end{document}

enter image description here

Now adding the line

       \setbeamercolor{block title}{fg=RoyalBlue,bg=white}

renders as

enter image description here

So while the background changes to white also the position of the tile seems to change which i do not want. Also I would like to add a little more space etween titel and the text underneath.

Could someone please help me. Additionaly I would also be grateful if somone could explain me how to define a block environment looking like this:

enter image description here

Thanks so much!

Best Answer

if you want to change the colours of an alert block, use \setbeamercolor{block title alerted}{...}:

\documentclass[10pt,xcolor=dvipsnames]{beamer}
\usetheme{metropolis}

\setbeamercolor{block title alerted}{%
    use={block title, alerted text},
    bg=white,
    fg=RoyalBlue
}

\begin{document}

\begin{frame}
   \begin{alertblock}{Title}
      Inhalt...
   \end{alertblock}
\end{frame}

\end{document}

enter image description here