How can I individually set the color of the hyperlinks ? It currently has a red box around it.


How can I select its color ? Like


I have many other boxes to put with different colors so Id rather repeatedly type a short idiot-friendly method then redefine the function definitions.

  • 1
    Reading the manual of hyperref helps: \hypersetup{linkcolor=blue}, for example – user31729 Feb 13 '18 at 15:47
  • @ChristianHupfer - But it doesn't help that much. urlcolor is the one you want, but it only works with colorlinks=true. I think the box colors are chosen by the PDF viewer. – John Kormylo Feb 13 '18 at 17:32
  • @JohnKormylo: True, I missed that it is about urls – user31729 Feb 13 '18 at 17:35
  • 1
    \usepackage[colorlinks,urlcolor=orange]{hyperref} to avoid the ugly boxes and fix a default organge color for URL links, and then \href{http://www.example.com}{\color{blue}www.example.com} to make a individual link in blue. – Fran Feb 13 '18 at 22:08

You can use {\color{<color>}\url{<url>}} or \href{<url>}{\color{<color>}<text>}. A macro could simplify only a little this:








In the odd case that you want link boxes instead of colored text, remove any package option incompatible with that boxes (e.g. colorlinks or hidelinks) and then use some like:

\hypersetup{urlbordercolor=cyan}   % return to default color

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.