# Wrong position of superscript with colored brackets

Coloring the brackets changes the position of the superscript. How can I get the same position as in the right example with standard color brackets? I intend to use \left) and \right) for brackets to get adapted bracket sizes in larger equations than in the given minimal example.

\documentclass{article}
\usepackage{color}
\begin{document}
$\color{red}\left(\right)\color{black}^2 \left(\right)^2$
\end{document}

• you are adding the superscript to the color node not the bracket use ^{\textcolor{black}{2}} – David Carlisle Jan 13 at 18:13
• ${\color{red}\left(\right)^{\color{black}2}} \left(\right)^{2}$ does the trick, like @DavidCarlisle said – TVL Jan 13 at 18:14