[Tex/LaTex] changing box color in hyperref

hyperreflinks

I wish to change the color of boxed links to red. But the code below still produces cyan links. What am I doing wrong?

\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{%
  colorlinks=false,
  linkbordercolor=red
}
\begin{document}
\href{http://www.tex.stackexchange.com}{Stack exchange link}
\end{document}

Best Answer

The linkbordercolor option is used for internal links, e.g. for the TOC, equation numbers etc.

For a 'true' hyperlink to a web site use the urlbordercolor option, either with

  • urlbordercolor=red combined with a colour name
  • urlbordercolor=[1 0 0] with some RGB colour specification (values from 0 to 1 allowed)

If all link borders should appear in red colour use the option allborders=red instead


\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{%
  colorlinks=false,
%  urlbordercolor=1 0 0  %  possible also
  urlbordercolor=red
}
\begin{document}
\href{http://www.tex.stackexchange.com}{Stack exchange link}
\end{document}

enter image description here