[Tex/LaTex] Change the background color of a frame in Beamer

backgroundsbeamercolor

How can I change the background color of one frame in my Beamer document? I tried doing

\begin{frame}
  \setbeamercolor{background canvas}{bg=violet}
  % frame contents here
\end{frame}

but it seemed to have no effect.

Anyone know what the problem is?

Best Answer

Modify the background canvas before you begin the frame, not within the frame.

To keep the effect of the color change local, you could use curly braces around the frame and that command, or \begingroup ... \endgroup.

{
\setbeamercolor{background canvas}{bg=violet}
\begin{frame}
  % frame contents here
\end{frame}
}