12

I have been trying to customize color themes in Madrid beamer theme for slide sections. I have checked the beamercolorthemedefault.sty file looking for the properties I should change to do so, and I was able to modify the frame title background:

\setbeamercolor{frametitle}{bg=green!40!black}

Also I could change it back with this:

\setbeamercolor{frametitle}{bg=beamer@blendedblue}

So far, I could not change the colors of the boxes at the bottom, which contains, author, short title, etc.. I have been wondering which color definitions are related to those, since I had changed couple of them I thought they would, with no success. I am a bit confused with the parental system of the color definition as well. Several of those are just link to another which is already defined like following:

\setbeamercolor{frametitle}{parent=titlelike}
\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{structure}{fg=beamer@blendedblue}

I am not sure where shall I interrupt this chain.

15

You have to dig into the Madrid theme in order to see what it sets for the colours. Looking at beamerthemeMadrid.sty, we see it uses the following additional themes:

\usecolortheme{whale}
\usecolortheme{orchid}
\useinnertheme[shadow]{rounded}
\useoutertheme{infolines}

While one might think the colours are defined in beamercolorthemewhale.sty and beamercolorthemeorchid.sty, this is only partially true. Let's look at the construction of the footline in beamerouterthemeinfolines.sty:

\setbeamercolor*{author in head/foot}{parent=palette tertiary}
\setbeamercolor*{title in head/foot}{parent=palette secondary}
\setbeamercolor*{date in head/foot}{parent=palette primary}

\defbeamertemplate*{footline}{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}

It seems to construct 3 boxes with the left using colour author in head/foot (parent=palette tertiary), the centre using colour title in head/foot (parent=palette secondary) and the right using colour date in head/foot (parent=palette primary). So, change the aforementioned colours.

I'd rather suggest changing the base colour, and letting the other theme colours follow relative to it. For example, change beamer@blendedblue:

enter image description here

\documentclass{beamer}
\usepackage{lmodern}
\usetheme{Madrid}

% Change base colour beamer@blendedblue (originally RGB: 0.2,0.2,0.7)
\colorlet{beamer@blendedblue}{green!40!black}

\begin{document}
\begin{frame}{Frame title}
  This is some frame content
\end{frame}
\end{document}

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.