7

I'm preparing a presentation using the following beamer theme:

\usetheme{AnnArbor}
\usecolortheme{beaver}

Is there any easy way to change the yellow color to cyan each time it is used in the theme? I have used Latex for some time but I have absolutely no idea how beamer works.

Edit: Here is a MWE. When I compile this, the title box is yellow, and that is the color I wanted to change to blue.

\documentclass{beamer}
\usepackage[spanish,activeacute]{babel}
\usetheme{AnnArbor}
\usecolortheme{beaver}
\begin{document}
\title{My title}  
\author{My name}
\date{\today} 
\begin{frame}
\titlepage
\end{frame}
\end{document}
2

AnnArbor defines the background color for titles (and similar) with:

\setbeamercolor{titlelike}{parent=structure,bg=yellow!85!orange}

(see beamerthemeAnnArbor.sty).

To change it into a kind of blue you can use something like:

\documentclass{beamer}
\usepackage[spanish,activeacute]{babel}
\usetheme{AnnArbor}
\usecolortheme{beaver}
\setbeamercolor{titlelike}{parent=structure,bg=cyan}
\begin{document}
\title{My title}  
\author{My name}
\date{\today} 
\begin{frame}
\titlepage
\end{frame}
\end{document}

The result is:

cyan background instead of yellow

Changing the foreground color is as easy, e.g., use

\setbeamercolor{titlelike}{parent=structure,fg=yellow,bg=cyan}

to get

yellow text, cyan background

See the beamer manual for more information about \setbeamercolor and keys like fg and bg.

  • Thank you so much, this is just what I needed! Is there any easy way to change the color of the text in the title box too? – Wild Feather May 9 '17 at 11:59
  • 1
    @WildFeather See the extended answer. But please also have a look at the beamer manual. – Schweinebacke May 9 '17 at 12:05
  • Thank you very much again, your answer is perfect! I will also take a look at the manual, but the length is discouraging and I needed a quick solution for today. – Wild Feather May 9 '17 at 12:07
8

I am offline for the rest of the week. If somebody sees a mistake etc. -- just edit it.

  1. I don't see any yellow color.
  2. This why a so-called minimal working example (MWE) is needed to avoid such problems.
  3. Look for the file beamercolorthemebeaver.sty on your computer. Here are the colors defined. See below.

beamercolorthemebeaver.sty

% Copyright 2004 by Madhusudan Singh <madhusudan.singh@gmail.com>
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
\mode<presentation>

\definecolor{darkred}{rgb}{0.8,0,0}

\setbeamercolor{section in toc}{fg=black,bg=white}
\setbeamercolor{alerted text}{fg=darkred!80!gray}
\setbeamercolor*{palette primary}{fg=darkred!60!black,bg=gray!30!white}
\setbeamercolor*{palette secondary}{fg=darkred!70!black,bg=gray!15!white}
\setbeamercolor*{palette tertiary}{bg=darkred!80!black,fg=gray!10!white}
\setbeamercolor*{palette quaternary}{fg=darkred,bg=gray!5!white}

\setbeamercolor*{sidebar}{fg=darkred,bg=gray!15!white}

\setbeamercolor*{palette sidebar primary}{fg=darkred!10!black}
\setbeamercolor*{palette sidebar secondary}{fg=white}
\setbeamercolor*{palette sidebar tertiary}{fg=darkred!50!black}
\setbeamercolor*{palette sidebar quaternary}{fg=gray!10!white}

%\setbeamercolor*{titlelike}{parent=palette primary}
\setbeamercolor{titlelike}{parent=palette primary,fg=darkred}
\setbeamercolor{frametitle}{bg=gray!10!white}
\setbeamercolor{frametitle right}{bg=gray!60!white}

\setbeamercolor*{separation line}{}
\setbeamercolor*{fine separation line}{}

\mode
<all>

MWE

\documentclass{beamer}

\usetheme{AnnArbor}
\usecolortheme{beaver}

\begin{document}
\begin{frame}{Test}
Test
\end{frame}
\end{document}

enter image description here


Changing the Colors

\documentclass{beamer}

\usetheme{AnnArbor}
\usecolortheme{beaver}

\definecolor{myNewColorA}{rgb}{0,0,100}
\definecolor{myNewColorB}{rgb}{0,100,100}
\definecolor{myNewColorC}{rgb}{0,200,100}
\definecolor{myNewColorD}{rgb}{0,100,200}

\setbeamercolor*{palette primary}{bg=myNewColorA, fg = green}
\setbeamercolor*{palette secondary}{bg=myNewColorB, fg = green}
\setbeamercolor*{palette tertiary}{bg=myNewColorC, fg = green}
\setbeamercolor*{palette quaternary}{bg=myNewColorD, fg = green}

\begin{document}
\begin{frame}{Test}
Test
\end{frame}
\end{document}

enter image description here

  • Thank you! I'm sorry, I totally forgot to write a MWE. The yellow color was in the title in the first slide. Any suggestions about where I can find the .sty file? – Wild Feather May 8 '17 at 20:41
  • Never mind, I found it, thank you very much again! – Wild Feather May 8 '17 at 21:53
  • 1
    @WildFeather Maybe you want to share your solution. – Dr. Manuel Kuehner May 8 '17 at 22:42
  • I just added a MWE, and I managed to find the .sty file you mentioned using the method of the accepted answer for this question. The comment by @Schweinebacke was just what I was looking for, and using your answer I managed to also change the colors of the bars. It looks fine now. Thanks! – Wild Feather May 9 '17 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.