# How to put parentheses in black when references is in an other color

This question is related to this post: Adding parentheses to figure references

How can I have black parentheses when the references are in blue when using the mentioned macro?

I have applied the blue color to my all references but I get that the parentheses for the figure references turn blue contrary to the ones of the author and equation references that keep the black color.

\documentclass{article}
\usepackage{hyperref}
\hypersetup{backref=true,
}

\makeatletter
\renewcommand\p@figure{\expandafter\counter@parenthesize}
\newcommand\counter@parenthesize[1]{(#1)}
\makeatother

\begin{document}

\begin{figure}
\caption{X}\label{X}
\end{figure}

See Figure~\ref{X}.

\end{document}


Thanks

\newcommand\counter@parenthesize[1]{\textcolor{black}{(}#1\textcolor{black}{)}}