I'm using the hyperref package with the hidelinks option, but there is one link I would like to be coloured and I'm trying to do this with an overriding hypersetup command in an environment which only contains that particular link. Why doesn't this work?
\documentclass{minimal}
\usepackage[hidelinks]{hyperref}
\begin{document}
\href{stackexchange.com}{hide this link}\
{\hypersetup{colorlinks=true}{\href{stackexchange.com}{do not hide this link}}}\
\href{stackexchange.com}{hide this link}
\end{document}
Result:
The method works just as intended the other way round:
\documentclass{minimal}
\usepackage{hyperref}
\begin{document}
\href{stackexchange.com}{do not hide this link}\
{\hypersetup{hidelinks}{\href{stackexchange.com}{hide this link}}}\
\href{stackexchange.com}{do not hide this link}
\end{document}



