I want to set all links within my document to some customcolor (different from those available by default: white, black, red, green, blue, cyan, magenta, yellow). Is there a way to achieve that?


To use custom defined colors you have to load the xcolor package in the preamble, as it gives you a couple of predefined conversion tables, such as RGB, CYMK, etc.

Then invoke the following command like described:

\definecolor{<custom name for color>}{<color model>}{<color values>}

The values depend on the color model, e.g. for the HTML color model you need to express the color in HEX values (see example).







colored links appear \href{here}{www.google.com}...


Edit: As an alternative to xcolor there is the color package.

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.