5

I am wondering how can I change the font color in the headline of my presentation?

I saw from Beamer how to change color of infolines and frame title how to change the color of the bar but not the actual font.

Could you please help?

Original code:

\documentclass[xcolor=dvipsnames]{beamer}
 \usetheme{CambridgeUS}
 \useinnertheme{rectangles}
 \useoutertheme{infolines}

 \setbeamercolor{frametitle}{fg=Brown,bg=Brown!20}
 \setbeamercolor{section in head/foot}{bg=Brown}
 \setbeamercolor{author in head/foot}{bg=Brown}
 \setbeamercolor{date in head/foot}{fg=Brown}

 \begin{document}

 \section{Font to be changed in the headline}
 \begin{frame}
 \frametitle{A test frame}
 \end{frame}

 \end{document}

EDIT: After the answer, the following doesn't seem to work for me

 \documentclass[xcolor=dvipsnames]{beamer}
 \mode<presentation>
 {
 \usetheme{AnnArbor}
 \setbeamercovered{transparent}
\useinnertheme{rounded}
   \usecolortheme{spruce}
 }

  \setbeamercolor{section in head/foot}{fg=White}


 \begin{document}

 \section{Font to be changed in the headline}
 \begin{frame}
 \frametitle{A test frame}
 \end{frame}

 \end{document}

I would like to keep the theme as it is and I would only like to change the font of the headline to be White otherwise it could not be read

Thanks

  • I added the original code that you changed in the edit (otherwise, the first part of my answer wouldn't make sense and other readers might get confused). I hope it's OK. – Gonzalo Medina Feb 17 '15 at 15:41
3

Add a fg (foreground) specification for the appropriate color templates; for example:

 \setbeamercolor{section in head/foot}{bg=Brown,fg=red}
 \setbeamercolor{subsection in head/foot}{bg=gray!30,fg=black}

A complete example:

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{CambridgeUS}
\useinnertheme{rectangles}
\useoutertheme{infolines}

\setbeamercolor{frametitle}{fg=Brown,bg=Brown!20}
\setbeamercolor{section in head/foot}{bg=Brown,fg=red}
\setbeamercolor{subsection in head/foot}{bg=gray!30,fg=black}
\setbeamercolor{author in head/foot}{bg=Brown}
\setbeamercolor{date in head/foot}{fg=Brown}

\begin{document}

\section{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\subsection{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}

\section{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\subsection{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}

\end{document}

The resulting headline:

enter image description here

Update

After the edit to the question, this

\documentclass[xcolor=dvipsnames]{beamer}
 \mode<presentation>
 {
 \usetheme{AnnArbor}
 \setbeamercovered{transparent}
\useinnertheme{rounded}
   \usecolortheme{spruce}
 }

  \setbeamercolor{section in head/foot}{fg=White}


 \begin{document}

 \section{Font to be changed in the headline}
 \begin{frame}
 \frametitle{A test frame}
 \end{frame}

 \end{document}

produces

enter image description here

  • Hi Gonzalo Medina, thanks for the quick reply. It does not work for me – ginu Feb 17 '15 at 15:15
  • 1
    @tom your comment is useless. Please add to your question a simple, yet complete document (like the one in my answer) showing the problem mentioned. – Gonzalo Medina Feb 17 '15 at 15:18
  • Your are totally right. Please see above I am editing the question. thanks again – ginu Feb 17 '15 at 15:23
  • @tom please see my updated answer. With your code I get the desired result (see image attached at the bottom). If you don't get this with the exact code you posted, perhaps you are using outdated packages? – Gonzalo Medina Feb 17 '15 at 15:30
  • it works now. It was a clash with the hyperref package. thank you very much for the answers – ginu Feb 17 '15 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.