# Getting the color from a beamer theme?

How do I find out what color a beamer theme uses? In particular, what is the color that the Singapore theme uses? I'd like to grab this color so that I can color my tables with it and remain consistent with the general theme. I've copied and pasted the .sty file for Singapore below. I really wasn't able to glean much from looking at it.

% Copyright 2007 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%

\ProvidesPackageRCS $Header: /cvsroot/latex-beamer/latex-beamer/themes/theme/beamerthemeSingapore.sty,v 1.10 2007/01/28 20:48:30 tantau Exp$

\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer

\mode<presentation>

\useoutertheme[subsection=false]{miniframes}

\setbeamertemplate{frametitle}[default][center]

\AtBeginDocument{%
{
}

{%
color(0cm)=(bg);
}

}

\beamertemplatedotitem

\mode
<all>

-
Just to be absolutely clear: are you using this theme in your presentation? Thus if you had a method whereby TeX could figure out the colour within the document, but you never knew the exact RGB values, would that suffice for your purposes? –  Loop Space Nov 5 '11 at 20:08
Yes, that would suffice. Probably be ideal actually. –  lowndrul Nov 5 '11 at 22:02

A beamer presentation uses several colors. beamer provides commands for using colors of the presentation elements. Choose the element of which you would like to use the color and apply it, for example:

{\usebeamercolor[fg]{structure} text}


prints text in a blue color, with Singapore theme.

Here fg means foreground, bg means background, instead of structure you may use title in head, section in head, normal text and many more. Have a look into the beamer manual for learning more about using colors.

-
Specifically, Section 17.2 "Changing the Colors ...". The \usebeamercolor command, and all its variants, are explained in Section 17.2.2. –  Loop Space Nov 5 '11 at 22:30
Thank you for the help. I checked out the manual and should mention that structure.fg was particularly useful to me. Because I'm coloring rows I need to do something like \rowcolor{<my color>}. structure.fg worked for <my color> whereas \usebeamercolor[fg]{structure} did not. Is this regular practice? –  lowndrul Nov 6 '11 at 0:15
Thanks @AndrewStacey, that manual is ridiculously difficult to find things in. –  naught101 Apr 29 '12 at 14:15

All the informations on color themes are in the directory Beamer\Base\Themes. But it's easier to write color=block body.bg to use the background color of the body of block, independently of the theme chosen.

-