[Tex/LaTex] What do two consecutive \usecolortheme statements mean in a beamer theme

beamercolorthemes

I was taking a look at a Beamer theme code in: /usr/local/texlive/2017basic/texmf-dist/tex/latex/beamer/themes/theme/beamerthemeRochester.sty

It contains code like this:

\useoutertheme[width=0pt]{sidebar}
\useinnertheme{rectangles}
\usecolortheme{whale}
\usecolortheme{orchid}

Why are there two consecutive \usecolortheme statements here? Wouldn't the second statement override the first statement anyway?

Best Answer

Both orchid and whale are loaded using the same mechanism of \usecolortheme, but they define colors for different instances of a beamer slide. Maybe the order of the lines could have been a bit different:

\useoutertheme[width=0pt]{sidebar}
\usecolortheme{whale}
\useinnertheme{rectangles}
\usecolortheme{orchid}

whale is an outer color theme, changing the appearance of palette colours. orchid on the other hand, is an inner color theme, most notably changing the color of blocks. The beamer documentation explains this in a little more detail.