2

I want to change colors for various elements in a presentation with Frankfurt style. I found how to change background and text color in the frametitle and outline ribbon, but I get two pale, horizontal green lines over and under the frame title. Any idea how I could remove them?

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Frankfurt}

\beamertemplatenavigationsymbolsempty
\setbeamercolor{section in head/foot}{fg=OliveGreen!40!Sepia, bg=OliveGreen!70!YellowGreen}
\setbeamercolor{structure}{fg=LimeGreen, bg = LimeGreen}
\setbeamercolor{alerted text}{fg=LimeGreen}
\setbeamercolor{title}{fg=Sepia, bg = LimeGreen!60!GreenYellow}
\setbeamercolor{frametitle}{fg=OliveGreen!60!Sepia, bg = LimeGreen!60!GreenYellow}


\title{Title}
\author{Me}
\date{Today} 

\begin{document}
  \section[My first section]{Section 1}
\begin{frame}
\frametitle{Frame title}
Some text
\end{frame}
\end{document}

This gives (red arrows added manually) :

enter image description here

| improve this question | | | | |
3

This problem has something to do with different colour models. There was a question somewhere on this side which explains it in detail, but unfortunately I can not find it right now.

In short: a workaround is to use a colour defined in RGB for the mixing.

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Frankfurt}

\beamertemplatenavigationsymbolsempty
\setbeamercolor{section in head/foot}{fg=OliveGreen!40!Sepia, bg=OliveGreen!70!YellowGreen}
\setbeamercolor{structure}{fg=LimeGreen, bg = LimeGreen}
\setbeamercolor{alerted text}{fg=LimeGreen}
\setbeamercolor{title}{fg=Sepia, bg = LimeGreen!60!GreenYellow}
\setbeamercolor{frametitle}{fg=OliveGreen!60!Sepia, bg = LimeGreen!60!GreenYellow}

\definecolor{mygreen}{RGB}{163,216,56}

\AtBeginDocument{
  \pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
        color(0ex)=(mygreen);%
        color(1ex)=(mygreen);%
        color(2ex)=(section in head/foot.bg)
  }
  \pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
        color(0ex)=(bg);%
        color(1ex)=(mygreen)
  }
}

\title{Title}
\author{Me}
\date{Today} 

\begin{document}
  \section[My first section]{Section 1}
\begin{frame}
\frametitle{Frame title}
Some text
\end{frame}
\end{document}

enter image description here


Alternatively you can select a \selectcolormodel{RGB}, but than you might have to adjust you colour selection in order to get the same results as above.

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Frankfurt}

\selectcolormodel{RGB}

\beamertemplatenavigationsymbolsempty
\setbeamercolor{section in head/foot}{fg=OliveGreen!40!Sepia, bg=OliveGreen!70!YellowGreen}
\setbeamercolor{structure}{fg=LimeGreen, bg = LimeGreen}
\setbeamercolor{alerted text}{fg=LimeGreen}
\setbeamercolor{title}{fg=Sepia, bg = LimeGreen!60!GreenYellow}
\setbeamercolor{frametitle}{fg=OliveGreen!60!Sepia, bg = LimeGreen!60!GreenYellow}

\title{Title}
\author{Me}
\date{Today} 

\begin{document}
    \section[My first section]{Section 1}
    \begin{frame}
        \frametitle{Frame title}
        Some text
    \end{frame}
\end{document}

enter image description here

| improve this answer | | | | |
  • With some adjustments the first option worked for me! – Nausi Jun 10 '16 at 10:29
2

Update

tikz now supports CMYK shadings out of the box since version 3.1.3. You still need to set the colour model to CMYK:

\RequirePackage[cmyk,dvipsnames]{xcolor}
\documentclass{beamer}

A new solution is now available to this question using a new package, pgf-cmykshadings, which supports shadings in CMYK for pgf.

The fundamental problem is this: The dvipsnames colours from xcolor are all defined in the CMYK colour space. beamer then uses pgf to create shadings using these colours. Except pgf does not support shadings in CMYK, only in RGB. So the shadings get converted to RGB, while the solid colours remain as CMYK and you get a colour mismatch.

The other answer to this question has already demonstrated how to use RGB colours everywhere, but you can continue to use the dvipsnames colours in the CMYK colour colour space and use CMYK shadings using the pgf-cmykshadings package.

Change the start of the MWE example to:

\RequirePackage[cmyk,dvipsnames]{xcolor}
\RequirePackage{pgf-cmykshadings}
\documentclass{beamer}

xcolor must be loaded first using the dvipsnames option to avoid an option clash. I've also used the cmyk option just to make sure that all colours will be in CMYK. And pgf-cmykshadings needs to be loaded before beamer to ensure that the shadings are set up in the CMYK colour space.

You'll now get CMYK output (as specified by the dvipsnames colours) everywhere including in shadings:

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.