# [Tex/LaTex] Set math fonts to predefined color

beamercolorequationsmath-mode

I am trying to define math text is some predefined color as in my preamble:

\setbeamercolor{math text}{pmsGreen}
\everymath{\color{pmsGreen}}
\everydisplay{\relax \ifx \\\@eqncr \else \color{pmsGreen}\fi }


NB: I have not understood the last line, just found it somewhere.
But the problem is while mathmode is in pmsGreen, text inside eqnarray is still in default color.
How can I manage this?

EDIT: A minimal example:

 \documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}
\definecolor{pmsGreen}{RGB}{0,156,121}

\mode<presentation>
{
\usetheme{Warsaw}
\setbeamercovered{transparent}
}
\setbeamercolor{math text}{pmsGreen}
\everymath{\color{pmsGreen}}
\everydisplay{\relax \ifx \\\@eqncr \else \color{pmsGreen}\fi }
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\im}{Im}

\begin{document}
$1=2$
\begin{eqnarray}
1=2\\
2=3
\end{eqnarray}
\end{document}


NB: I have seen examples where the sample code shows the output as well, dont know how to do that.

Quoting the manual:

Beamer-Color math text

This color is the parent of math text inlined and math text displayed. It is empty by default. See those colors for details.

Beamer-Color math text displayed

Color parents: math text

Like math text inlined, only for so-called “displayed” mathematical text. This is mathematical text between [ and ] or between $$and$$ or inside environments like equation or align. The setup of this color is somewhat fragile, use at your own risk. The background is currently ignored.

So, you have to exploit:

\setbeamercolor{math text}{fg=pmsGreen}
\setbeamercolor{math text displayed}{fg=pmsGreen}


to have also equations in align colored (avoid using eqnarray, see eqnarray vs align).

An example:

\documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}
\definecolor{pmsGreen}{RGB}{0,156,121}
\usepackage{lmodern}
\mode<presentation>
{
\usetheme{Warsaw}
\setbeamercovered{transparent}
\setbeamercolor{math text}{fg=pmsGreen}
\setbeamercolor{math text displayed}{fg=pmsGreen}
}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\im}{Im}

\begin{document}
\begin{frame}{Title}
$1=2$
\begin{quotation}
1=2
\end{quotation}

$$x+y=100$$

\begin{align}
1=2 \\
2=3
\end{align}
\begin{itemize}
\item \only<2>{Contains essentially \textit{all} physical information of a given system} $A(\vec{r},\vec{r}^{'})=-\dfrac{1}{\pi}\im\Tr\int^{\mu}_{\curvearrowright} dz~\hat{A}~G(\vec{r},\vec{r}^{'};z)$
\end{itemize}
\end{frame}
\end{document}


The result: