I need to change the color of only underbrace in the following post.
MWE from above link is:
\overbrace{your-formula}^\text{your comment}
\underbrace{your-formula}_\text{your comment}
An example taken from Wikibooks:
\[
z = \overbrace{
\underbrace{x}_\text{real} +
\underbrace{iy}_\text{imaginary}
}^\text{complex number}
\]
Their result:


\textcolorinstead of\coloras in\[ z = \overbrace{ \textcolor{red}{\underbrace{\color{black}x}_\text{\color{black}real}} + \textcolor{blue}{\underbrace{\color{black}iy}_\text{\color{black}imaginary}} }^\text{complex number} \]be simpler? – Gonzalo Medina Aug 14 '15 at 00:31\textcoloruses curly braces and therefore it becomes a subformula. Therefore it only can be used to color ordinary math atoms. In this example it would work, but it will not, when coloring the binary plus sign or the equals sign. – Heiko Oberdiek Aug 14 '15 at 04:22\underbracket(frommathtools) would look nicer than\underbrace, in my opinion. – Bernard Aug 14 '15 at 08:25