[Tex/LaTex] color theme in beamer presentation

beamercolor

I'm using the following codes

 \documentclass{beamer}
 \usecolortheme[named=Mahogany]{structure} 
 \usefonttheme[onlymath]{serif}
 \usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath,amssymb,amsfonts} %math

\usetheme[secheader]{Madrid}


\begin{document}

\begin{frame}{Outline}

\end{frame}

\end{document} 

I want to change \usecolortheme[named=blue]{structure} by \usecolortheme[named=Mahogany]{structure}, but it doen't compilate.

Thank you for your help.

Best Answer

You need to pass the dvipsnames option to xcolor:

\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=Mahogany]{structure} 
\usefonttheme[onlymath]{serif}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath,amssymb,amsfonts} %math

\usetheme[secheader]{Madrid}


\begin{document}

\begin{frame}{Outline}

\end{frame}

\end{document}