[Tex/LaTex] Colour themes in beamer not working for lemma/theorem/definition environments

beamercolorenvironments

I'm currently trying to learn how to use beamer, and I have a presentation in a few days on red-black trees. For thematic reasons, I decided to go with the beaver colour scheme (as it gives me red and black as the main colours, which seemed fitting). However, for all the amsmath-defined environments (lemma, theorem, proof and definition), I still have blue headers with white text, instead of what I would expect from the beaver colour theme. What am I doing wrong? I've attached my minimal working example below.

\documentclass[onlymath]{beamer}

\mode<presentation>
{
  \usetheme{Antibes}
  \usecolortheme{beaver}
  \setbeamercovered{transparent}
}


\usepackage[english]{babel}

\usepackage[latin1]{inputenc}

\usepackage{times}
\usepackage[T1]{fontenc}

\usepackage{tikz}

\usepackage{capt-of}

\usepackage{algorithm, float}
\usepackage[noend]{algpseudocode}
\usepackage{comment}

\title{Red-Black Trees}

\subtitle{Motivation, Description, Performance} % (optional)

\author {Kostya Ross}
\institute {AUT University}
\date {\today}


% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

 \pgfdeclareimage[height=1cm]{university-logo}{aut_logo.jpg}
 \logo{\pgfuseimage{university-logo}}

\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{Motivation}{The sorted set problem}
\begin{lemma} %the title of this should be coloured as per beaver, but isn't for some reason
Something for testing.
\end{lemma}
\end{frame}

\end{document}

Am I crazy, or is this doable?

Best Answer

The Antibes theme calls the orchid color theme. This sets the colors for the block environments (as seen in the beamercolorthemeorchid.sty), but the beaver color theme does not set those colors. So you have to do it by hand. The lines you could add (and edit to your liking) in your themes sections are

\setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{block title alerted}{use=alerted text,fg=white,bg=alerted text.fg!75!black}
\setbeamercolor{block title example}{use=example text,fg=white,bg=example text.fg!75!black}

\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!10!bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!10!bg}

and the beamercolorthemebeaver.sty might help you to pick the matching colors.

You are probably using the standard block most of the time. Here we see that the orchid theme uses the structure color, which is set by\setbeamercolor{structure}{fg=beamer@blendedblue} in the default color theme.

Long story short: Maybe you can just set the structure color to something that matches the theme. For example

 \setbeamercolor{structure}{fg=darkred}

Note that darkred is a color set within the beaver color theme.

This gives you slides like this:

enter image description here

And if you'd rather have a gray background for the body of the block, add something like:

\setbeamercolor{block body}{bg=gray!10!white}

to get this result:

enter image description here