1

\hpagecolor[color1]{color2} changes the background color gradually from color1 on the left to color2 on the right. If only color2 is given, the background will be in that color, fading from left to right.

How can I bring such a fading effect in the background colors in the navigation bar and footer in the following image. Here they are just two solid colors black and blue. I wish to have a continuous spectrum say from black to blue.

\documentclass[12pt]{beamer}
\usepackage[english]{babel}  
\usepackage[utf8]{inputenc} 
\beamertemplatenavigationsymbolsempty
\setbeamercovered{transparent}
\setbeamertemplate{footline}[]

\usetheme{Warsaw}
\usecolortheme{seahorse}

\title[]{Some title}

\begin{document}
\begin{frame}
\titlepage
\end{frame}

\section{Introduction}
\subsection{Sub Intro}
\begin{frame}
\frametitle{Intro}
\end{frame}

\end{document}

enter image description here

Similarly how do I bring the effect (say red to green) in the background of headings as in "Intro" in this image.

Thanks in advance.

  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Adam Liter Dec 23 '14 at 7:02
2

You could do something like this:

\documentclass[12pt]{beamer}
\usepackage[utf8]{inputenc} 
\usepackage{tikz}
\beamertemplatenavigationsymbolsempty
\setbeamercovered{transparent}
\setbeamertemplate{footline}[]

\usetheme{Warsaw}
\setbeamertemplate{headline}{
  \begin{tikzpicture}[minimum height=4.15ex,halfhead/.style={text=white,overlay,text width=.5\paperwidth,inner sep=0pt}]
    \node(a)[minimum width=\paperwidth,left color=structure.fg,right color=black]{};
    \node[halfhead,align=right,anchor=south west]at(a.south west){\insertsectionhead\hskip10pt};
    \node[halfhead,align=left,anchor=south east]at(a.south east){\hskip10pt\insertsubsectionhead};
  \end{tikzpicture}
}

\setbeamertemplate{footline}{
  \begin{tikzpicture}[minimum height=4.15ex,halfhead/.style={text=white,overlay,text width=.5\paperwidth,inner sep=0pt}]
    \node(a)[minimum width=\paperwidth, left color=green,right color=red]{};
    \node[halfhead,align=right,anchor=south west]at(a.south west){\insertauthor\hskip10pt};
    \node[halfhead,align=left,anchor=south east]at(a.south east){\hskip10pt\inserttitle};
  \end{tikzpicture}
}

\title[]{Some title}
\author{Author}
\begin{document}
\begin{frame}
\titlepage
\end{frame}

\section{Introduction}
\subsection{Sub Intro}
\begin{frame}
\frametitle{Intro}
\end{frame}

\end{document}

enter image description here

I used TikZ for the shading effect. You basically need to modify two templates: headline and footline. In the example I made the headline look like the frame title (same blue/black shading), but you can easily customize the appearance by changing the left color and right color values.

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.