[Tex/LaTex] How to adjust the PaloAlto beamer theme

beamercolor

I have the the beamer theme "PaloAlto" and I want to change the size and the color of the left and top bar (1 and 2 in the picture). How can it be done?

enter image description here

And how to change the color of the title, author section and subsection in the sidebar?

enter image description here

Best Answer

Comments are in-code:

\documentclass{beamer}
\usetheme[width=1cm]{PaloAlto}          %controls the width of the sidebar
\setbeamercolor{frametitle}{bg=red}     %controls the color of the headline
\setbeamercolor{sidebar}{bg=red}        %controls the color of the sidebar
\setbeamercolor{logo}{bg=red!70!black}  %controls the color of the logo area

\makeatletter
\beamer@headheight=1.5\baselineskip     %controls the height of the headline, default is 2.5    
\makeatother
    
\begin{document}
\section{test}
\subsection{test}
\begin{frame}{a frame}
\framesubtitle{title}
test
\end{frame}

\end{document}

enter image description here

If you need a more drastic color restyling, i.e. affecting everything, consider using a specific color theme via \usecolortheme{<color theme name>}

How to find out what parameters need to be changed to customize a theme

There is no simple answer to this question. As a general procedure you could do the following:

  1. Check the Beamer user guide (in this case it tells us about the width theme option

If the beamer manual does not provide the info you are looking for, you need to check the source code.

  1. Check the theme file, located in texmf-dist/tex/latex/beamer/themes/theme/
  2. The theme file will tell you what outer theme is used, so you can check that too: texmf-dist/tex/latex/beamer/themes/outer/

The outer theme file is where the templates for the "look" of the presentation are generally stored. In this case, the sidebar outer theme is used, which defines its own headline template where the colors, width, ecc. are specified.

When you gain some confidence with the source code it is usually easy to go straight to the file that contains the relevant template.

Edit 2

\setbeamercolor{section in sidebar}{fg=...}            %color of the active section
\setbeamercolor{section in sidebar shaded}{fg=...}     %color of the inactive section
\setbeamercolor{subsection in sidebar}{fg=...}         %color of the active subsection
\setbeamercolor{subsection in sidebar shaded}{fg=...}  %color of the inactive subsection
\setbeamercolor{title in sidebar}{fg=...}              %color of the presentation title
\setbeamercolor{author in sidebar}{fg=...}             %color of the author