Is it possible to override the hyperref instruction of showing the references in a specific colour but only within the context of TikZ and pgfplots? The problem is that I am using legend to ref and \ref in a tikzpicture environment and the text of the legend becomes blue because of the hyperref global setting. I don't know how to force legend's text colour or even if that would work, but the solution I am looking for should be something that can be set globally in the preamble if possible.
MWE:
\documentclass{article}
\usepackage{tikz,pgfplots}
\usepgfplotslibrary{groupplots}
\usepackage[colorlinks,linkcolor={blue}]{hyperref}
\begin{document}
\begin{figure}[]
\centering
\begin{tikzpicture}
% \hypersetup{hidelinks} % jfbu's solution: Uncomment to get black text.
\begin{groupplot}[
group style={
group size=2 by 1,},]
\nextgroupplot[scale only axis,width=0.35\textwidth,height=0.35\textwidth,legend to name=grouplegend,]
\addplot
coordinates {(1,1) (2,2) (3,3)};
\addlegendentry{Legend 1}
\nextgroupplot[scale only axis,width=0.35\textwidth,height=0.35\textwidth]
\addplot
coordinates {(1,1) (2,2) (3,3)};
\end{groupplot}
\node (legend) at ($(group c1r1.south)!0.5!(group c2r1.south)$)
[below, yshift=-3\pgfkeysvalueof{/pgfplots/every axis title shift}]
{\ref{grouplegend}};
\end{tikzpicture}%
\caption{The caption.}
\end{figure}
\end{document}

jfbu's solution of placing \hypersetup{hidelinks} in the tikzpicture environment works by maintaining the links (I'm not interested in that) but showing the text in black. I'm looking for a way to achieve this globally though.

\hypersetup{hidelinks}inside a group (and environments create groups) in the past to address a similar issue. This cures the color problem by suppressing the links. I sort of remember having tried unsuccessfully to change the linkcolor using similarly otherhyperrefoptions locally. – Jul 30 '13 at 15:01\hypersetup{hidelinks}as the first thing inside your tikzpicture. Perhaps this will work. – Jul 30 '13 at 15:12tikzpictureenvironment works. But I need something that can be set globally. @Jake: Yes, I'm editing my post now. – sudosensei Jul 30 '13 at 15:53tikzpictures using\tikzset{ every picture/.style={ execute at begin picture=\hypersetup{hidelinks} } }– Jake Jul 30 '13 at 16:04tikzpicturethat I could not decently be credited with an answer related to its use... – Jul 30 '13 at 16:22tikzpicture. ;-) – sudosensei Jul 30 '13 at 16:29