1

I'd like to have a beamercolorbox in the color of the theme "Madrid" (the color of the title box). Currently, I approximated the color on myself.

\usetheme{Madrid} 
\setbeamercolor{bgcolor}{fg=white,bg=blue!75!black} 
\begin{frame} 
   \begin{beamercolorbox}[rounded=true,center=true]{bgcolor} 
      {\LARGE Text}   
   \end{beamercolorbox} 
\end{frame}
1

2 Answers 2

3

I am not an expert -- I just investigated out of curiosity!

Short Answer

Use the color pre-defined structure or the solution that samcarter provides.

Long Answer

  • I found the style file beamerthemeMadrid.sty in the path C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\themes\theme.
  • Two color themes are loaded, \usecolortheme{whale} and \usecolortheme{orchid}.
  • beamercolorthemewhale.sty I found in the path C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\themes\color. beamercolorthemeorchid.sty too.
  • Here are the color definitions I found in the two color theme files:

beamercolorthemewhale.sty

\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor*{palette quaternary}{fg=white,bg=black}

\setbeamercolor*{sidebar}{use=structure,bg=structure.fg}

\setbeamercolor*{palette sidebar primary}{use=structure,fg=structure.fg!10}
\setbeamercolor*{palette sidebar secondary}{fg=white}
\setbeamercolor*{palette sidebar tertiary}{use=structure,fg=structure.fg!50}
\setbeamercolor*{palette sidebar quaternary}{fg=white}

beamercolorthemeorchid.sty

\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!10!bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!10!bg}

Solved Questions

  • I do not know where the color for structure is defined. Maybe there is some kind of default color theme....but then...see below.
  • According to beamer: find RGB definition of default (structure) color?, the default structure color is \definecolor{beamer@blendedblue}{rgb}{0.2,0.2,0.7}.
  • This can be found in beamercolorthemedefault.sty (C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\themes\color) (thanks user samcarter).
  • This leads to {RGB}{0.2*255,0.2*255,0.7*255} = {RGB}{51,51,178} (actually 178.5).

Manuel Approach

  • Here I just determine the color by using a simple so-called color picker This may be a designated software tool or a functionality of a decent graphic software. I used PowerPoint :).

enter image description here

MWE

\documentclass{beamer}

\usetheme{Madrid}

\begin{document}

\begin{frame}[t]
\frametitle{Test}
\begin{block}{Test}
Test
\end{block}
Test
\end{frame}

\end{document}
2
1

If you want the beamercolorbox to have the colour of the frametitle, use the colour of the frametitle :)

\documentclass{beamer}

\usetheme{Madrid} 

\begin{document}

\begin{frame}
\frametitle{Test} 
   \begin{beamercolorbox}{frametitle} 
      {\LARGE Text}   
   \end{beamercolorbox} 

   \begin{beamercolorbox}{title} 
      {\LARGE Text}   
   \end{beamercolorbox} 
\end{frame}

\end{document}

[the colour of the title from titlepage works the same way - I was not sure which title box you are referring to]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .