Document ClassesBeamer: slide colors

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
workerbee
Posts: 43
Joined: Sat Nov 22, 2008 1:53 am

Beamer: slide colors

Post by workerbee »

Hi,

I was hoping to change the default color of a Beamer presentation (from blue) to a purple-red. I found a way to change the elements I want to red, but could not define a purple.

The red version used this coding:

Code: Select all

\documentclass[red]{beamer}
\usetheme{Warsaw}
\usepackage{beamerthemesplit}
\useoutertheme[subsection=false]{smoothbars}
How do I change this to make it purple? The specific shade:

rgb=.49,0,98
cmyk=.92,1,.22,.29

Attached is a slide in the default blue. I marked where I would like to have the purple. In a non-title cover slide, it would be the bar/background of the frametitle part.

Also, I've tried the \setbeamercolor{beamer element}{color} and it didn't work.

Using:
\setbeamercolor{frametitle}{purple}
Attachments
purple-beamer.jpg
purple-beamer.jpg (42.68 KiB) Viewed 42158 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Beamer: slide colors

Post by gmedina »

Hi,

the color that you are trying to change is controlled by the palette primary and it is defined in the beamer color theme whale (used by the Warsaw theme). To change it you have to redefine the background color used in this palette; try something like the following:

Code: Select all

\documentclass{beamer}
\usetheme{Warsaw}

\definecolor{mypurple}{rgb}{.49,0,98}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=mypurple}

\title{The title}
\author{The author}
\institute{The Institute}
\date{\today}

\begin{document}

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

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
workerbee
Posts: 43
Joined: Sat Nov 22, 2008 1:53 am

Re: Beamer: slide colors

Post by workerbee »

It worked beautifully, thanks! :)
ohenri100
Posts: 8
Joined: Tue Aug 03, 2010 7:49 am

Re: Beamer: slide colors

Post by ohenri100 »

Second method:
Into C:\Program Files\MiKTeX 2.8\tex\latex\beamer\base
Open beamer.cls file and look at:
\DeclareOptionBeamer{red}{
\ClassWarning{beamer}{``red'' is obsolete. Use color theme structure instead}
\def\beamer@loadlater{\usecolortheme[rgb={0.7,0.2,0.2}]{structure}}}

You could add your color theme or modify any color theme.
Example add:
\DeclareOptionBeamer{red-brown}{
\ClassWarning{beamer}{``red-brown'' is obsolete. Use color theme structure instead}
\def\beamer@loadlater{\usecolortheme[rgb={0.9,0.2,0.2}]{structure}}}

This method is complex more first method. BUT it changes colortheme completely. The items run after will have the same color with palette.
Who I am?
Haftom
Posts: 1
Joined: Sun May 15, 2022 7:25 am

Beamer: slide colors

Post by Haftom »

How to change the default color of warsaw latex into cyan blue?
Post Reply