# Changed all math text to red in beamer, now I can't make some math text black

When I try to make the checkmark black using the following code, it doesn't work; the checkmark shows up red. How do I make it black?

\documentclass{beamer}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage{color, xcolor, graphicx}
\usepackage[english]{babel}

\usetheme{Warsaw}
\usecolortheme{beaver}
\setbeamercolor{math text}{fg=darkred!70!black}

\begin{document}
\begin{frame}{Title}
\begin{block}{Example}
Let $G = <a, b, c \mid [ab], [bc]>$, $w_1 = c$, and $w_2 = ab$.

Shortest? \pause \textcolor{black}{\checkmark}
\end{block}
\end{frame}
\end{document}

-
enclose it in $...$: $\textcolor{black}{\checkmark}$ –  cmhughes Dec 20 '12 at 23:33
@cmhughes, I had tried '\textcolor{black}{$\checkmark$}', but not the whole thing inside '$...$'. Your answer also works! –  Keila Dec 21 '12 at 0:08

You have defined the color of math text as red. Hence, you get it in red. To get some other math in some other color, you may adopt these techniques:

Redefine the math text color in a group:

{\setbeamercolor{math text}{fg=black}{\checkmark}}


See the opening and closing braces (group)

Or define a macro with an optional color (default is black):

\newcommand{\blaak}[2][black]{%
\bgroup
\setbeamercolor{math text}{fg=#1}{#2}
\egroup
}%


and use it as:

\blaak[blue]{\checkmark} %% or
\blaak{\checkmark}


# Code:

\documentclass{beamer}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage{color, xcolor, graphicx}
\usepackage[english]{babel}

\usetheme{Warsaw}
\usecolortheme{beaver}
\setbeamercolor{math text}{fg=darkred!70!black}
\newcommand{\blaak}[2][black]{%
\bgroup
\setbeamercolor{math text}{fg=#1}{#2}
\egroup
}%

\begin{document}
\begin{frame}{Title}
\begin{block}{Example}
Let $G = <a, b, c \mid [ab], [bc]>$, $w_1 = c$, and $w_2 = ab$.

Shortest? \pause {\setbeamercolor{math text}{fg=black}{\checkmark}} $\textcolor{black}{\checkmark}$
\blaak[blue]{\checkmark} \blaak{\checkmark}
\end{block}
\end{frame}
\end{document}

-