2

I was wondering if it is possible to have a different colour for your framesubtitle than the colour your frametitle has?

I found out how to change the fontsize seperately here: Set frame subtitle size

So I thought I'd try the same thing for the colour (inside a custom template) (the lines of code are not really all underneath each other, but spread out in the template files...)

\setbeamercolor{framesubtitle}{fg=yellow}%

\setbeamerfont{framesubtitle}{size=\Large}%

\defbeamertemplate*{frametitle}{my theme}
{%
  \vskip.2cm
  \begin{beamercolorbox}[right]{frame title}%
    \insertframetitle\\\usebeamercolor{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle%
  \end{beamercolorbox}%
}

However the colour does not change one bit... What am I doing wrong? Or if there is a totally different way to do this, what is it?

5

You have to specify which component of the beamercolor you want to use. So if you want to use the foreground colour, use usebeamercolor[fg]{framesubtitle}. For the background component, it would be [bg].

\documentclass{beamer}

\setbeamercolor{framesubtitle}{fg=yellow}%

\setbeamerfont{framesubtitle}{size=\Large}%

\defbeamertemplate*{frametitle}{my theme}
{%
    \vskip.2cm
    \begin{beamercolorbox}[right]{frame title}%
        \insertframetitle\\\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle%
    \end{beamercolorbox}%
}

\begin{document}
    \begin{frame}
        \frametitle{blub}
        \framesubtitle{test}

    \end{frame}
\end{document}

enter image description here

| improve this answer | |

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.