# How can I change the colour scheme of a beamer presentation between different slides?

This is my frist question, so please pardon me if I don't include enough detail!

I'm new to LaTeX, and I'm currently working on a Beamer presentation about research I've been doing over the summer. In an effort to make my presentation look nice, I was wanting to change the "accent" colours from slide to slide. I've mostly figured it out, but it's not quite working. When I include definitions, they use the colours of the previous slide until the second frame appears, when the colour switches to the one I've chosen. Here's a quick example of the code I've been using.

\documentclass{beamer}

\title{Changing the Colours of Individual Slides}

\usepackage{colourchange}

\useinnertheme{rectangles}

\begin{document}

\frame{\titlepage}

\selectmanualcolor{red}
\frame{
\frametitle{This has a definition}
\begin{definition}
This definition originally appears in blue.
\end{definition}
\onslide<2-> On the next frame, it becomes red.
}

\end{document}


This is what the the code above produces, without the title page:

If anyone could help me figure out how to have the definitions showing up in the correct colour right away, I would be greatly appreciative.

• Welcome to TeX.sx! Nice question, and a good minimal example. – Alan Munn Aug 13 '15 at 1:19
• Thanks so much! I've been finding a lot of helpful answers here for a while, and figured it was time I made an account. – Becky Aug 13 '15 at 1:21

The package sets the colour without using it and this is not enough in this case. You can workaround the bug by telling Beamer to activate the colours yourself:

\documentclass{beamer}
\usepackage{colourchange}
\useinnertheme{rectangles}
\title{Changing the Colours of Individual Slides}

\begin{document}
\frame{\titlepage}

\selectmanualcolor{red}
\usebeamercolor{structure}
\begin{frame}{This has a definition}
\begin{definition}
This definition originally appears in blue.
\end{definition}
\onslide<2-> On the next frame, it becomes red.
\end{frame}

\end{document}


However, as noted in Becky's comment, this has the effect of changing the text colour in an unwanted way:

A better solution is probably to replace the colour setting command in the package:

\documentclass{beamer}
\usepackage{colourchange}
\renewcommand\setcolours{%
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}%
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}%
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}%
\setbeamercolor*{palette quaternary}{fg=white,bg=structure.fg!80!black}%
\setbeamercolor*{sidebar}{use=structure,bg=structure.fg}%
\setbeamercolor*{palette sidebar primary}{use=structure,fg=structure.fg!10}%
\setbeamercolor*{palette sidebar secondary}{fg=white}%
\setbeamercolor*{palette sidebar tertiary}{use=structure,fg=structure.fg!50}%
\setbeamercolor*{palette sidebar quaternary}{fg=white}%
\setbeamercolor*{titlelike}{parent=palette primary}%
\setbeamercolor{itemize item}{bg=structure}%
\setbeamercolor*{block title}{use=structure,bg=structure.fg,fg=white}%
\setbeamercolor*{block body}{use=structure,bg=structure.fg!50!white}%
}

\useinnertheme{rectangles}
\title{Changing the Colours of Individual Slides}

\begin{document}
\frame{\titlepage}

\selectmanualcolor{red}
\begin{frame}{This has a definition}
\begin{definition}
This definition originally appears in blue.
\end{definition}
\onslide<2-> On the next frame, it becomes red.
\end{frame}

\end{document}


Beamer has a complex colour configuration and I suspect that the package author does not completely understand its intricacies or has not fully appreciated their implications for 'real world' presentations.

I recommend reporting this as a bug.

• Thank you so much! This is really helpful. Is there any way to keep the text black, other than writing \color{black} before it? – Becky Aug 13 '15 at 1:15
• @Becky You are right. See edited answer for a better solution - albeit one which requires more lines of code. – cfr Aug 13 '15 at 1:49