# Change the background color of a frame in Beamer

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?

-

## 2 Answers

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.

-
Thanks, works great! –  Ben Alpert Dec 31 '10 at 20:04
@Stefan, I tried to do as you said, but the color stay the same as previous slides. Do you know why it could possibly not work? –  damluar Mar 15 '13 at 20:39

Put the \setbeamercolorcommand outside the frame. This will change the background colour for every subsequent frame. If you want to just change that slide, you can surround the frame and the command in {}

-