# Colored bar above title in LaTeX beamer

I wrote an unofficial beamer template for my university. I put the beamer style file and example presentation on github: https://github.com/broesel007/dshsbeamer

Here my question: How can I add a colored bar (e.g. red) above the blue title bar? I also would like to add the logo of our institute in that bar. How can I do that? Any recommendations?

• Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. Jun 9, 2013 at 9:18

You can set the headline template appropriately. The separation line color allows you to define the background color for the new bar; I set it to myred, where I used

\definecolor{myred}{RGB}{225,0,76}


Of course, use the color that best suits your needs. I also defined a \Ulogo command that allows you to introduce the University logo centered in this bar; the usage of this command is similar to that of \titlegraphic:

\Ulogo{\includegraphics[height=2ex,width=3cm]{<image file>}}


A complete example (since no information was provided about dimensions of the new bar and position of the logo, I used some sensible values, but you can change those according to your needs):

\documentclass{beamer}

\mode<presentation>
{
\usetheme{dshsbeamer}
\setbeamercovered{transparent}
\setbeamertemplate{items}[circle]
}

\usepackage{fontspec}
\setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}

% color definitions
\usepackage{xcolor}
\definecolor{spohoblue}{RGB}{0, 83, 146}
\definecolor{black}{RGB}{0, 0, 0}

\definecolor{myred}{RGB}{225,0,76}
\setbeamercolor{separation line}{bg=myred}
\newcommand\Ulogo[1]{\def\insertUlogo{#1}}

\makeatletter
{
\@tempdima=\textwidth%
\begin{beamercolorbox}[colsep=1.5pt,wd=\the\@tempdima,ht=4ex,dp=0ex]{separation line}
\vbox{}\vskip-10pt
\hfill\insertUlogo\hfill\null
\vskip0.5ex
\end{beamercolorbox}%
}
\makeatother

\title[Short title]{An unofficial beamer template for the German Sport University Cologne}
\author[Short author]{Magnus Metz}
{Institute of Sport Economics and Sport Management \\
German Sport University Cologne \\
}
\Ulogo{\includegraphics[height=2ex,width=3cm]{example-image-a}}
\date{\today}

\begin{document}

\begin{frame}
\frametitle{First slide}
A test frame
\end{frame}

\end{document}


• Thank you for your answer. What do I need to do, if I want to have the logo of the University as high as the red separation line and aligned to the right? Thank you very much for further informations! Sincerely yours, broesel Oct 13, 2013 at 23:32