Generalbeamer | Alter Color of Block

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
drowsy
Posts: 44
Joined: Tue Dec 23, 2008 6:00 am

beamer | Alter Color of Block

Post by drowsy »

Hi,

how can I change the color of the title of the definition block in Beamer without changing the color theme completely?

That is, I have this.

Code: Select all

\begin{definition}
Text
\end{definition}
But definitions have exactly the same color as theorems.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

beamer | Alter Color of Block

Post by gmedina »

Hi,

take a look at the following example:

Code: Select all

\documentclass{beamer}
\usetheme{Warsaw}

\begin{document}

\begin{frame}
\begingroup
\setbeamercolor{block title}{bg=red,fg=blue}%bg=background, fg= foreground
\setbeamercolor{block body}{bg=yellow,fg=green}%bg=background, fg= foreground
 \begin{definition}
   A group $G$ is cyclic if there existis an element $x\in G$ such that $\langle x\rangle=G$.
 \end{definition}
\endgroup
\end{frame}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply