I have a math equation with a \tag
operator.
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
\begin{document}
This is my favorite equality:
\begin{align*}
\color{red}\sum_{n=1}^\infty\dfrac{1}{n^2}=\dfrac{\pi^2}{6}.\tag{E1}
\end{align*}
\end{document}
I would like to color the tag (E1) in red.
What I did is I added \tag{\textcolor{red}{E1}}
but this only colored the E1 without the parentheses.
\tag*
and add the () manually to it\tag*{\textcolor{red}{(E1)}}
(as already suggested by @daleif) or\tag*{\color{red}(E1)}
.