Text colour in empheq for multiline AMS environments
(works for non numbered only)
You can apply the color to the whole environment simply using \color{}
before it. But, make sure that the color changes apply only to the environment, so embrace everything with braces, that is,
{\color{<color>}...}
Off topic: I would not use those \left \right
.
MWE
\documentclass{article}
\usepackage[svgnames,x11names]{xcolor}
\usepackage{empheq}
\newcommand{\HEG}[1]{%
{\color{Snow1}%
\begin{empheq}[box=\colorbox{Thistle4}]{gather}{#1}\end{empheq}%
}%
}
\begin{document}
Text in normal color.
\HEG{
\mathcal{T} (a_1 \{x_{1k}\} + a_2 \{x_{2k}\}) = \\
a_1 \mathcal{T}(\{x_{1k}\}) + a_2 \mathcal{T}(\{x_{2k}\})
}
Text in normal color.
\end{document}
A small variation of Sigur's answer: I define an environment instead of a macro (my idiosyncrasy: I find it better to read) and declare a new tag form which guarantees that the equation number is still printed in black.
\documentclass{article}
\usepackage[svgnames, x11names]{xcolor}
\usepackage{empheq}
% provided by mathtools, which is loaded by empheq
\newtagform{black}{\textcolor{black}\bgroup(}{)\egroup}
\newenvironment{important}[1][gather] % optional parameter defaults to gather
{%
\usetagform{black}%
\color{Snow1}%
\setkeys{EmphEqEnv}{#1}%
\setkeys{EmphEqOpt}{box=\colorbox{Thistle4}}%
\EmphEqMainEnv
}{\endEmphEqMainEnv}
\begin{document}
See
\begin{important}
\mathcal{T}(a_1\{x_{1k}\} + a_2\{x_{2k}\}) = \nonumber \\
= a_1 \mathcal{T} (\{x_{1k}\}) + a_2 \mathcal{T}(\{x_{2k}\})
\end{important}
or similarly
\begin{important}[align]
\mathcal{T}(a_1\{x_{1k}\} + a_2\{x_{2k}\}) &= \\ \nonumber
&= a_1 \mathcal{T} (\{x_{1k}\}) + a_2 \mathcal{T}(\{x_{2k}\})
\end{important}
\end{document}