# What are structural elements? Customizing the mechnism of beamer color theme

When I search the Internet, I can find many pieces of code including \usecolortheme[named=XXX]{structure}. If I add it to my presentation, I can see maybe there are some changes. I would like to know when I choose a theme such as Rochester, the color of the structural elements (though I do not know the detail issues) is to be set to some type. Do the structural elements depend upon which theme (such as Rochester) is chosen? Would you please tell me what are included in the structural elements?

      \documentclass{beamer}
\usetheme{CambridgeUS}

\title{Title1}
\author{Author}
\institute{Institute}
\date{Date}

\begin{document}

\frame{
\titlepage

}

\section[Outline]{}
\frame{\tableofcontents}

\frame{\frametitle{Topic1}

HTML color codes are the \textbf{hexadecimal triplets} representing the colors red, green, and blue.
\vspace{0.25cm}

These color codes can be used to change the color of the background, text, and tables on a web page.
}

\begin{frame}
testQ
\end{frame}
\end{document}


Above is a piece of craft code .For this theme CambridgeUS ,if I add \usecolortheme[named=XXX]{structure} ,the headline color does not change,I notice some innertheme elements' colors are changed,while I change it to the theme Rochester,I add the \usecolortheme[named=XXX]{structure} ,the headline color also changed.Then my question comes out.

• Hi! I'm not sure I understand the question. Maybe a Minimal (non-)Working Example (MWE) would be helpful in this case. To the down-voter: Please remember that down-voting without a really good reason is frowned upon on this site; furthermore, down-voting without commenting the reason is simply rude. – yo' Aug 28 '13 at 10:58
• Thank you for your response very much!I think I have to study hard to use English fluently.I will add some code pieces. – nyRobot Aug 28 '13 at 11:05
• @nyRobot: the reason is that no all the themes have a structure template. In that case you will be able anyway to customize colors by exploiting some personalization on the palettes templates. – Claudio Fiandrino Aug 28 '13 at 11:50
• Do you mean different themes have different structural elements? – nyRobot Aug 28 '13 at 11:57

The command

\usecolortheme[named=XXX]{structure}


applies only to the Beamer themes that made use of the structure template.

Where can you check which themes use this template? Via shell you can easily find the path where the Beamer class is installed via:

kpsewhere beamer.cls


which gives to me:

/usr/local/texlive/2013/texmf-dist/tex/latex/beamer/beamer.cls


Open this directory and then /themes/theme. You will find, among the others, beamerthemeRochester.styand beamerthemeCambridgeUS.sty. The color themes they use are different:

• Rochester uses whale and orchid;
• CambridgeUS uses beaver.

Now, for what concern the color themes of Rochester, only whale is relevant for the structural elements as orchid defines the block colors. The important things to be noticed in whale is that the relevant color palettes has use=structure which are the magic words that allow to later customize the colors with the template structure. Instead, beaver does not make use of this.

This is why this code:

  \documentclass[svgnames]{beamer}
\usetheme{Rochester}
%\usetheme{CambridgeUS}

\title{Title1}
\author{Author}
\institute{Institute}
\date{Date}

\usecolortheme[named=SeaGreen]{structure}

\begin{document}

\frame{
\titlepage

}

\section[Outline]{}
\frame{\tableofcontents}

\frame{\frametitle{Topic1}

HTML color codes are the \textbf{hexadecimal triplets} representing the colors red, green, and blue.
\vspace{0.25cm}

These color codes can be used to change the color of the background, text, and tables on a web page.
}

\begin{frame}
testQ
\end{frame}
\end{document}


gives you:

while:

  \documentclass[svgnames]{beamer}
%\usetheme{Rochester}
\usetheme{CambridgeUS}

\title{Title1}
\author{Author}
\institute{Institute}
\date{Date}

\usecolortheme[named=SeaGreen]{structure}

\begin{document}

\frame{
\titlepage

}

\section[Outline]{}
\frame{\tableofcontents}

\frame{\frametitle{Topic1}

HTML color codes are the \textbf{hexadecimal triplets} representing the colors red, green, and blue.
\vspace{0.25cm}

These color codes can be used to change the color of the background, text, and tables on a web page.
}

\begin{frame}
testQ
\end{frame}
\end{document}


generates:

Final disclaimer: what I said is not completely true as you may notice that some elements in CambridgeUS inherits the customization given by \usecolortheme[named=SeaGreen]{structure}. This is because Beamer is highly modular, so you have to take care (carefully) of what you're doing while modifying some aspects, in other words check if some templates still inherit colors definition from structure.