Skip to content

Instantly share code, notes, and snippets.

@bdarcus
Created July 16, 2021 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdarcus/d109f074d7edb65bac566b11eaba98e6 to your computer and use it in GitHub Desktop.
Save bdarcus/d109f074d7edb65bac566b11eaba98e6 to your computer and use it in GitHub Desktop.
hyperref config

Turn all links "MidnightBlue":

% https://tex.stackexchange.com/questions/100905/best-practice-for-hyperref-link-colours
\usepackage[dvipsnames]{xcolor}
\newcommand\myshade{85}

\hypersetup{
 colorlinks = true,
 allcolors = MidnightBlue!\myshade!black,
}

Screenshot from 2021-06-03 08-01-44

Or if you want different colors for different links:

\newcommand\myshade{85}
\colorlet{mylinkcolor}{violet}
\colorlet{mycitecolor}{YellowOrange}
\colorlet{myurlcolor}{Aquamarine}

\hypersetup{
  linkcolor  = mylinkcolor!\myshade!black,
  citecolor  = mycitecolor!\myshade!black,
  urlcolor   = myurlcolor!\myshade!black,
  colorlinks = true,
}

Screenshot from 2021-06-03 08-41-28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment