[Tex/LaTex] How to replace Warsaw black to someting else, like color theme beaver does

beamercolorthemes

The Warsaw theme uses black for the left half of top and bottom bars, and blue for the right half. Theme color beaver replaces these two colors with two shades of gray. How can I do the same within my .tex file?

Best Answer

Those colors are controlled by palette primary and palette quaternary, so you can redefine them:

\documentclass{beamer}
\usetheme{Warsaw}

\setbeamercolor*{palette primary}{use=structure,fg=white,bg=gray!60}
\setbeamercolor*{palette quaternary}{fg=white,bg=gray!30!black}

\begin{document}

\section{One}
\begin{frame}test\end{frame}
\section{Two}
\begin{frame}test\end{frame}
\section{Three}
\begin{frame}test\end{frame}
\section{Four}
\begin{frame}test\end{frame}
\section{Five}
\begin{frame}test\end{frame}

\end{document}

enter image description here

Changing the palettes will also affect some other elements of the theme; if you just want to change the colors for the headline and footline, you can simply change the section in head/foot, and subsection in head/foot colors:

\documentclass{beamer}
\usetheme{Warsaw}

\setbeamercolor{section in head/foot}{fg=white,bg=gray!20!black}
\setbeamercolor{subsection in head/foot}{fg=black,bg=gray!30}

\begin{document}

\section{One}
\begin{frame}test\end{frame}
\section{Two}
\begin{frame}test\end{frame}
\section{Three}
\begin{frame}test\end{frame}
\section{Four}
\begin{frame}test\end{frame}
\section{Five}
\begin{frame}test\end{frame}

\end{document}

enter image description here

But if you just want to use the beaver color theme with Warsaw, then simply say

\documentclass{beamer}
\usetheme{Warsaw}
\usecolortheme{beaver}

\begin{document}

\section{One}
\begin{frame}test\end{frame}
\section{Two}
\begin{frame}test\end{frame}
\section{Three}
\begin{frame}test\end{frame}
\section{Four}
\begin{frame}test\end{frame}
\section{Five}
\begin{frame}test\end{frame}

\end{document}
Related Question