[Tex/LaTex] How to specify a color for example blocks

beamerthemes

I use Beamer with XeLaTeX. I don't use any Beamer themes because it is more useful to specify some parameters manually. I used some colors for all blocks and all blocks have these colors… except the blocks for "Example" environment.

  1. Why Example environment do not use my colors?
  2. How can I fix it?

System: Windows 7, MikTeX.

\documentclass[pdf,10pt,unicode]{beamer}
\usefonttheme{professionalfonts}
\usepackage{hyperref}

\usepackage{polyglossia}
\usepackage{tikz}

\setromanfont{Times New Roman}
\newfontfamily\cyrillicfontrm{Times New Roman}
\setsansfont[Mapping=tex-text]{Calibri}
\newfontfamily\cyrillicfontsf[Mapping=tex-text]{Calibri}
\setmonofont{Courier New}
\newfontfamily\cyrillicfonttt{Courier New}
\setmainfont{Cambria}
\newfontfamily\cyrillicfont{Cambria}

\usepackage{unicode-math}
\setmathfont{Cambria Math}

\setdefaultlanguage{english}

\defaultfontfeatures{Mapping=tex-text}
\usepackage{amsmath, amsthm}

\setbeamertemplate{blocks}[rounded][shadow=true]

\definecolor{LightViolet}{RGB}{230,220,255}
\setbeamercolor{frametitle}{bg=LightViolet}

\definecolor{NormalBlue}{RGB}{200,200,255}
\setbeamercolor{block title}{bg=NormalBlue}

\definecolor{LightBlue}{RGB}{220,220,255}
\setbeamercolor{block body}{bg=LightBlue}

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]

\setbeamertemplate{itemize items}[ball] 
\setbeamertemplate{enumerate items}[circle]

\parskip=0.5em

\begin{document}

\begin{frame}
\frametitle{Frametitle}
\begin{definition}
This is a definition
\end{definition}

\begin{theorem}
This is a theorem
\end{theorem}

\begin{block}{Block}
This is a regular block
\end{block}

\begin{example}
This is a example block
\end{example}
\end{frame}

\end{document}

MWE: mwe.tex, mwe.pdf

Best Answer

Example and alert blocks use their own colours, which you can set separately.

\documentclass[pdf,10pt,unicode]{beamer}

\setbeamertemplate{blocks}[rounded][shadow=true]

\definecolor{LightViolet}{RGB}{230,220,255}
\setbeamercolor{frametitle}{bg=LightViolet}

\definecolor{NormalBlue}{RGB}{200,200,255}
\setbeamercolor{block title}{bg=NormalBlue}

\definecolor{LightBlue}{RGB}{220,220,255}
\setbeamercolor{block body}{bg=LightBlue}

\setbeamercolor{block body example}{bg=red!20!white}
\setbeamercolor{block title example}{fg=red, bg=red!40!white}

\begin{document}

\begin{frame}
\frametitle{Frametitle}
\begin{definition}
This is a definition
\end{definition}

\begin{theorem}
This is a theorem
\end{theorem}

\begin{block}{Block}
This is a regular block
\end{block}

\begin{example}
This is a example block
\end{example}
\end{frame}

\end{document}

enter image description here