55

Update 2021 In a new driver for hyperref that I'm developing as part of the "LaTeX tagged PDF" project I use the colors suggested by Phelype Oleinik as default colors. All other suggestions have been added as color scheme and can be chosen with an option.


There have been some complaints that the default colors of hyperref aren't so great. So here your chance for better defaults. Suggest a new set of color. The best one will be either the default (if we dare to change it) or added through an option, e.g. nicecolors.

(there is also a anchorcolor option, but the color isn't used anywhere so I left it out).

You can enter any color you want and in what ever syntax you prefer. Adding options to xcolor or loading some other package is fine too.

\documentclass{article}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}

%setup new colors
\hypersetup{
% linkcolor=
%,citecolor=
%,filecolor=
%,urlcolor=
%,menucolor=
%,runcolor=
%,linkbordercolor=
%,citebordercolor=
%,filebordercolor=
%,urlbordercolor=
%,menubordercolor=
%,runbordercolor=
}
\begin{document}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color               & example   \\\hline\\
 \textcolor{red}{red, linkcolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citecolor}& \cite{cite} \\\\
 \textcolor{cyan}{cyan, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{magenta}{magenta, urlcolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{cyan}{cyan, runcolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 1} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{red}{red, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citebordercolor}& \cite{cite} \\\\
 \textcolor{teal}{teal, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menubordercolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}

enter image description here

15
  • 1
    I've used the following for a few books (we set file- and urlcolor to be the same): \definecolor{linkcolour}{rgb}{0,0.2,0.6}, \definecolor{citecolour}{rgb}{0,0.6,0.2}, \definecolor{urlcolour} {rgb}{0.8,0,0.8}, via \hypersetup{linkcolor=linkcolour,citecolor=citecolour,filecolor=urlcolour,urlcolor=urlcolour,}
    – daleif
    Commented Jan 22, 2020 at 16:52
  • 2
    @daleif it doesn't matter much how you enter the colors here as it is only about finding better defaults - the internal representation will be probably different anyway. Commented Jan 22, 2020 at 17:38
  • 10
    I'd like to suggest the henryford color scheme. Commented Jan 22, 2020 at 19:52
  • 10
    In my experience, most readers actually strongly appreciate if only one color (usually, but not necessarily, blue) is used for all hyperlinks -- regardless of whether they "point" to URLs, cross-referenced items, cited publications, footnotes, or what have you. Using different colors for all hyperlink targets quickly makes one's document look like an over-decorated Christmas tree.
    – Mico
    Commented Jan 22, 2020 at 20:11
  • 3
    Well, I think 2 colors need to be avoided. One is red, since it's the color of warning (like in beamer's \alert command), and green since it's too bright, and hence is very difficult to read. It would be also great if there would be a separate color option for table of contents, since table of contents doesn't have to stand out from the surrounding text (because there is no surrounding text), while links may want to stand out some. This of course is not a criticism of the fantastic, flawlessly working hyperref package. Commented Apr 27, 2023 at 19:06

7 Answers 7

24

Here's a proposal (the default color column is (unsurprisingly) the default colour, and the example column is the ones I'm suggesting):

enter image description here

I tried to stick to darker colours because too bright ones, especially pure yellow (#FFFF00), but also green (#00FF00) and cyan (#00FFFF), are terrible to read, both in PDF print. Note that in the picture above the menu colour is still a bit bright; yellow is not a good colour to put on a white background. . .

The first three colours I chose based on some colours I used for my own documents (one red, one green and one blue), and the other three I tried to pick so that they were different enough from the first ones. The border colours are the same as the text colours, except that they are mixed with white, so that the border doesn't punch you in the face when you look at it. I also changed the width of the border from 1 to 0.3, if that's a valid option.

I also tweaked the original colours I had so that they look different enough for people with the three severe types of colour blindness (colour blindness simulated using Color Oracle):

Deuteranopia (green-blind):

enter image description here

Protanopia (red-blind):

enter image description here

Tritanopia (blue-blind):

enter image description here

I also chose less bright colours so that greyscale print of documents will also be readable (though hidelinks is a better option in this scenario). The brightest colour (the View Something text in the left column) is still darker than about half of the default colours (results may vary depending on how you compute brightness).

enter image description here

Here's the code:

\documentclass{article}
\usepackage{xcolor}
\usepackage[margin=1.5cm]{geometry}
\usepackage{multicol}
\usepackage[colorlinks]{hyperref}

\def\tmp#1#2#3{%
  \definecolor{Hy#1color}{#2}{#3}%
  \hypersetup{#1color=Hy#1color}}
\tmp{link}{HTML}{800006}
\tmp{cite}{HTML}{2E7E2A}
\tmp{file}{HTML}{131877}
\tmp{url} {HTML}{8A0087}
\tmp{menu}{HTML}{727500}
\tmp{run} {HTML}{137776}
\def\tmp#1#2{%
  \colorlet{Hy#1bordercolor}{Hy#1color#2}%
  \hypersetup{#1bordercolor=Hy#1bordercolor}}
\tmp{link}{!60!white}
\tmp{cite}{!60!white}
\tmp{file}{!60!white}
\tmp{url} {!60!white}
\tmp{menu}{!60!white}
\tmp{run} {!60!white}

\begin{document}

\begin{multicols}{2}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color               & example   \\\hline\\
 \textcolor{red}{red, linkcolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citecolor}& \cite{cite} \\\\
 \textcolor{cyan}{cyan, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{magenta}{magenta, urlcolor}& \url{www.latex-project.org}\\\\
 \textcolor{red}{red, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{cyan}{cyan, runcolor}  &  \href{run:sumatra}{run something}\\\\
\end{tabular}

You can read more in section~\ref{sec} and in~\cite{cite}. Both of which
contain a~\href{example-image.pdf}{file} that can also be found at
\url{www.latex-project.org}. Such file helps you \Acrobatmenu{View}{View
Something} or, alternatively \href{run:sumatra}{run something}, which is
rather nice.

\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 0.3} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{red}{red, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citebordercolor}& \cite{cite} \\\\
 \textcolor{teal}{teal, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& \url{www.latex-project.org}\\\\
 \textcolor{red}{red, menubordercolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor}  &  \href{run:sumatra}{run something}\\\\
\end{tabular}

You can read more in section~\ref{sec} and in~\cite{cite}. Both of which
contain a~\href{example-image.pdf}{file} that can also be found at
\url{www.latex-project.org}. Such file helps you \Acrobatmenu{View}{View
Something} or, alternatively \href{run:sumatra}{run something}, which is
rather nice.

\end{multicols}

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}
4
  • 1
    Much better, because less hurting, colours. But the chance should be taken to unify the colour schemes for bordered and colour links.
    – AlexG
    Commented Jan 23, 2020 at 6:45
  • @AlexG You mean the exact same colours for <some>color and <some>bordercolor? I always disliked how striking is the appearance of those boxes (I never use the boxes, really), so I figured a lighter shade of the same colour would be better. Commented Jan 23, 2020 at 11:19
  • Yes, same colours. If at all, less saturated colours for colour links, perhaps. They weigh heavier than borders (need more ink) by nature.
    – AlexG
    Commented Jan 23, 2020 at 11:41
  • @AlexG They are the same colour (in some sense :-). The boxes (even if they weigh less than the colour links) look more intrusive to me (I'm biased though), that's why I mixed a bit with white. It doesn't look too bad if I remove the !60!white thing, but keep the thinner rule for the boxes... Commented Jan 23, 2020 at 12:13
19

My personal preference would be that most link should be a uniform NavyBlue (vote here for that option).

Furthermore, the default should be colorlinks and not border. Borders are not easy to see and they are misrendered in Preview.app on macOS (see screenshot at end of this post). However, border don't print by default, so some may prefer them to colorlinks.


All that said, here is a proposal in which most types of links are still distinguishable. The most common types of links, i.e. internal link, and citations, are a different shade of the same colour that is currently used, so that people familiar with the meaning of these colours would not be confused. Weblinks are blue, as this is the de-fact standard on the web.

The screenshot is from Acrobat on macOS.

enter image description here

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage[colorlinks]{hyperref}

%setup new colors
\hypersetup{
linkcolor=BrickRed
,citecolor=Green
,filecolor=Mulberry
,urlcolor=NavyBlue
,menucolor=BrickRed
,runcolor=Mulberry
,linkbordercolor=BrickRed
,citebordercolor=Green
,filebordercolor=Mulberry
,urlbordercolor=NavyBlue
,menubordercolor=BrickRed
,runbordercolor=Mulberry
}
\begin{document}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color               & example   \\\hline\\
 \textcolor{BrickRed}{BrickRed, linkcolor}  & \ref{sec} \\\\
 \textcolor{Green}{Green, citecolor}& \cite{cite} \\\\
 \textcolor{Mulberry}{Mulberry, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{NavyBlue}{NavyBlue, urlcolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{BrickRed}{BrickRed, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{Mulberry}{Mulberry, runcolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\subsection*{Example text}

You can read more in section~\ref{sec} and in~\cite{cite}. Both of which
contain a~\href{example-image.pdf}{file} that can also be found at
\url{www.latex-project.org}. Such file helps you \Acrobatmenu{View}{View
Something} or, alternatively \href{run:sumatra}{run something}, which is
rather nice.


\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 1} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{BrickRed}{BrickRed, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{Green}{Green, citebordercolor}& \cite{cite} \\\\
 \textcolor{Mulberry}{Mulberry, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{NavyBlue}{NavyBlue, urlbordercolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{BrickRed}{BrickRed, menubordercolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{Mulberry}{Mulberry, runbordercolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\subsection*{Example text}

You can read more in section~\ref{sec} and in~\cite{cite}. Both of which
contain a~\href{example-image.pdf}{file} that can also be found at
\url{www.latex-project.org}. Such file helps you \Acrobatmenu{View}{View
Something} or, alternatively \href{run:sumatra}{run something}, which is
rather nice.

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}

The following is what frequently happens in Preview.app on macOS when using a non-retina screen. Preview.app is one of the most common PDF viewers. Therefore, whether or not this is a bug in Preview, borders should not be the default. colorlinks is always better.

enter image description here

7

For voting purposes, I post a second answer in which most link types have the same colour. I chose NavyBlue for this because blue is the typical link colour on the web. Those link types which could be considered a security issue may have another, more alerting colour, such as Red. I will let others decide which link types should be highlighted this way. For this demo, I chose file, menu and run. Some may consider file links to be more akin to url links than to run links, and may therefore prefer them to be blue.

enter image description here

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage[colorlinks]{hyperref}

%setup new colors
\hypersetup{
linkcolor=NavyBlue
,citecolor=NavyBlue
,filecolor=Red
,urlcolor=NavyBlue
,menucolor=Red
,runcolor=Red
,linkbordercolor=NavyBlue
,citebordercolor=NavyBlue
,filebordercolor=Red
,urlbordercolor=NavyBlue
,menubordercolor=Red
,runbordercolor=Red
}
\begin{document}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color               & example   \\\hline\\
 \textcolor{NavyBlue}{NavyBlue, linkcolor}  & \ref{sec} \\\\
 \textcolor{NavyBlue}{NavyBlue, citecolor}& \cite{cite} \\\\
 \textcolor{Red}{Red, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{NavyBlue}{NavyBlue, urlcolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{Red}{Red, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{Red}{Red, runcolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 1} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{NavyBlue}{NavyBlue, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{NavyBlue}{NavyBlue, citebordercolor}& \cite{cite} \\\\
 \textcolor{Red}{Red, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{NavyBlue}{NavyBlue, urlbordercolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{Red}{Red, menubordercolor}  & \Acrobatmenu{Red}{View Something}\\\\
 \textcolor{Red}{Red, runbordercolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}
7

One could argue that the default colours do not need to distinguish between all six kinds of links. Semantically it makes sense to visually highlight the difference between internal links within the document, and external links to other files or web sites.

Here is a proposal using the popular 5-class RdBu color scheme from colorbrewer2.org which is both print friendly and colourblind safe. Using tex.stackexchange.com/a/117959/24165 the internal colour is also used for footnotes.

hyperref colors example

\documentclass{article}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}
\usepackage{etoolbox}

\makeatletter
\def\@footnotecolor{red}
\define@key{Hyp}{footnotecolor}{%
 \HyColor@HyperrefColor{#1}\@footnotecolor%
}
\patchcmd{\@footnotemark}{\hyper@linkstart{link}}{\hyper@linkstart{footnote}}{}{}
\makeatother

\definecolor{intcolor}{HTML}{CA0020}
\definecolor{extcolor}{HTML}{0571B0}
%setup new colors
\hypersetup{
linkcolor=intcolor
,citecolor=intcolor
,filecolor=extcolor
,urlcolor=extcolor
,menucolor=intcolor
,runcolor=extcolor
,linkbordercolor=intcolor
,citebordercolor=intcolor
,filebordercolor=extcolor
,urlbordercolor=extcolor
,menubordercolor=intcolor
,runbordercolor=extcolor
,footnotecolor=intcolor
}
\begin{document}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color\footnote{internal color used for footnotes}               & example   \\\hline\\
 \textcolor{red}{red, linkcolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citecolor}& \cite{cite} \\\\
 \textcolor{cyan}{cyan, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{magenta}{magenta, urlcolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{cyan}{cyan, runcolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 1} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{red}{red, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citebordercolor}& \cite{cite} \\\\
 \textcolor{teal}{teal, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menubordercolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}
5

I like Phelypes suggestions. Just wanted to add some that we have used for a few books (that are also available as PDF files). We always use the colorlinks option and does not differentiate between file and url.

They are either different colors or darker versions of the default, mainly chosen such that they do not disturb the reading experince.

\documentclass{article}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}

%setup new colors
\hypersetup{
linkcolor={[rgb]{0,0.2,0.6}},
citecolor={[rgb]{0,0.6,0.2}},
filecolor={[rgb]{0.8,0,0.8}},
urlcolor={[rgb]{0.8,0,0.8}},
runcolor={[rgb]{0.8,0,0.8}},  % defaults to filecolor but it missing an
                              % expansion for this syntax
menucolor={[rgb]{0,0.2,0.6}}, % I never set or use this, so we'll see
                              % it to link color
linkbordercolor={[rgb]{0,0.2,0.6}},
citebordercolor={[rgb]{0,0.6,0.2}},
filebordercolor={[rgb]{0.8,0,0.8}},
urlbordercolor={[rgb]{0.8,0,0.8}},
runbordercolor={[rgb]{0.8,0,0.8}},
menubordercolor={[rgb]{0,0.2,0.6}}, 
}
\begin{document}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color               & example   \\\hline\\
 \textcolor{red}{red, linkcolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citecolor}& \cite{cite} \\\\
 \textcolor{cyan}{cyan, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{magenta}{magenta, urlcolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{cyan}{cyan, runcolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 1} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{red}{red, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citebordercolor}& \cite{cite} \\\\
 \textcolor{teal}{teal, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menubordercolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor}  &  \href{run:sumatra}{run something}
\end{tabular}

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}

enter image description here

5

Somewhat in accordance with the 'henry ford color scheme' I suggest an even dark gray (60%) across all hyperrefs (with colorlinks as defaults as Szabolcs suggested). Additional bonuses are: No trouble with printing grayscale and no trouble with color vision deficiencies.

About the links being colored for safety (i.e. in order to tell where they lead to): most pdf-viewers should give you a heads-up if a link leads to something off your machine anyway.

enter image description here

\documentclass{article}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}

\definecolor{darkgray}{HTML}{666666}
%setup new colors
\hypersetup{
 linkcolor=darkgray
,citecolor=darkgray
,filecolor=darkgray
,urlcolor=darkgray
,menucolor=darkgray
,runcolor=darkgray
,linkbordercolor=darkgray
,citebordercolor=darkgray
,filebordercolor=darkgray
,urlbordercolor=darkgray
,menubordercolor=darkgray
,runbordercolor=darkgray
}
\begin{document}
\section{hyperref colors / colorlinks}\label{sec}

\begin{tabular}{lll}
 default color               & example   \\\hline\\
 \textcolor{red}{red, linkcolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citecolor}& \cite{cite} \\\\
 \textcolor{cyan}{cyan, filecolor} & \href{example-image.pdf}{file}\\\\
 \textcolor{magenta}{magenta, urlcolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menucolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor{cyan}{cyan, runcolor}  &  \href{run:sumatra}{run something}
\end{tabular}
\bigskip

In running text \ref{sec} these \cite{cite} refs shoud still be quite visible: \href{example-image.pdf}{file}. Check \url{https://www.latex-project.org/} for more information, \Acrobatmenu{View}{View Something} if it helps, or even \href{run:sumatra}{run something}.

\section{hyperref colors / border }
\makeatletter\def\@pdfborder{1 1 1} \def\HyColor@UseColor#1{}\makeatother

\begin{tabular}{lll}
 default color                    & example   \\\hline\\
 \textcolor{red}{red, linkbordercolor}  & \ref{sec} \\\\
 \textcolor{green}{green, citebordercolor}& \cite{cite} \\\\
 \textcolor{teal}{teal, filebordercolor} & \href{example-image.pdf}{file}\\\\
 \textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& \url{https://www.latex-project.org/}\\\\
 \textcolor{red}{red, menubordercolor}  & \Acrobatmenu{View}{View Something}\\\\
 \textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor}  &  \href{run:sumatra}{run something}
\end{tabular}
\bigskip

In running text \ref{sec} these \cite{cite} refs shoud still be quite visible: \href{example-image.pdf}{file}. Check \url{https://www.latex-project.org/} for more information, \Acrobatmenu{View}{View Something} if it helps, or even \href{run:sumatra}{run something}.

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}
\end{document}
2
  • I just discovered this nice effort (too late).
  • This is not an answer but too complicated for a comment.
  • Feel free to "Flag" and/or delete the "answer' if you dislike it.
  • There is a nice website that is related to the color choice topic including colorblind safe and print-friendly considerations.
  • The author is apparently an expert on the topic (see here and here).

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here


Update

% Based on https://tex.stackexchange.com/questions/525261 (Ulrike's code)

\documentclass{article}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}

% Set 1
\definecolor{MK_One_One}{RGB}{140,81,10}
\definecolor{MK_One_Two}{RGB}{216,179,101}
\definecolor{MK_One_Three}{RGB}{246,232,195}
\definecolor{MK_One_Four}{RGB}{199,234,229}
\definecolor{MK_One_Five}{RGB}{90,180,172}
\definecolor{MK_One_Six}{RGB}{1,102,94}

%setup new colors 1
\hypersetup{
 linkcolor=MK_One_One
,citecolor=MK_One_Two
,filecolor=MK_One_Three
,urlcolor= MK_One_Six
,menucolor=MK_One_Five
,runcolor=MK_One_Four
,linkbordercolor=MK_One_One
,citebordercolor=MK_One_Two
,filebordercolor=MK_One_Three
,urlbordercolor=MK_One_Six
,menubordercolor=MK_One_Five
,runbordercolor=MK_One_Four
}

\begin{document}
\tableofcontents

\noindent
Based on \url{https://colorbrewer2.org/#type=diverging&scheme=BrBG&n=6}.

\section{Proposal 1}\label{sec}
\subsection{Colorlinks}

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkcolor}         & \ref{sec} \\\\
 \texttt{citecolor}         & \cite{cite} \\\\
 \texttt{filecolor}         & \href{example-image.pdf}{file}\\\\
 \texttt{urlcolor}          & \url{https://www.latex-project.org/}\\\\
 \texttt{menucolor}         & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runcolor}          & \href{run:sumatra}{run something}
\end{tabular}

\subsection{Borders}
\makeatletter
\def\@pdfborder{1 1 1} 
\def\HyColor@UseColor#1{}
\makeatother

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkbordercolor}   & \ref{sec} \\\\
 \texttt{citebordercolor}   & \cite{cite} \\\\
 \texttt{filebordercolor}   & \href{example-image.pdf}{file}\\\\
 \texttt{urlbordercolor}    & \url{https://www.latex-project.org/}\\\\
 \texttt{menubordercolor}   & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runbordercolor}    &  \href{run:sumatra}{run something}
\end{tabular}

\makeatletter
\def\@pdfborder{0 0 0} 
\def\HyColor@UseColor#1{%
\ifx\relax#1\@empty
\else
\ifx\@empty#1\@empty
\else
\expandafter\expandafter\expandafter\HyColor@@UseColor#1\@nil
\fi
\fi
}
\makeatother

% ========================================================

% Set 2
\definecolor{MK_Two_One}{RGB}{178,24,43}
\definecolor{MK_Two_Two}{RGB}{239,138,98}
\definecolor{MK_Two_Three}{RGB}{253,219,199}
\definecolor{MK_Two_Four}{RGB}{209,229,240}
\definecolor{MK_Two_Five}{RGB}{103,169,207}
\definecolor{MK_Two_Six}{RGB}{33,102,172}

%setup new colors 2
\hypersetup{
 linkcolor=MK_Two_One
,citecolor=MK_Two_Two
,filecolor=MK_Two_Three
,urlcolor= MK_Two_Six
,menucolor=MK_Two_Five
,runcolor=MK_Two_Four
,linkbordercolor=MK_Two_One
,citebordercolor=MK_Two_Two
,filebordercolor=MK_Two_Three
,urlbordercolor=MK_Two_Six
,menubordercolor=MK_Two_Five
,runbordercolor=MK_Two_Four
}

\section{Proposal 2}
\subsection{Colorlinks}

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkcolor}         & \ref{sec} \\\\
 \texttt{citecolor}         & \cite{cite} \\\\
 \texttt{filecolor}         & \href{example-image.pdf}{file}\\\\
 \texttt{urlcolor}          & \url{https://www.latex-project.org/}\\\\
 \texttt{menucolor}         & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runcolor}          & \href{run:sumatra}{run something}
\end{tabular}

\subsection{Borders}
\makeatletter
\def\@pdfborder{1 1 1} 
\def\HyColor@UseColor#1{}
\makeatother

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkbordercolor}   & \ref{sec} \\\\
 \texttt{citebordercolor}   & \cite{cite} \\\\
 \texttt{filebordercolor}   & \href{example-image.pdf}{file}\\\\
 \texttt{urlbordercolor}    & \url{https://www.latex-project.org/}\\\\
 \texttt{menubordercolor}   & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runbordercolor}    &  \href{run:sumatra}{run something}
\end{tabular}

\makeatletter
\def\@pdfborder{0 0 0} 
\def\HyColor@UseColor#1{%
\ifx\relax#1\@empty
\else
\ifx\@empty#1\@empty
\else
\expandafter\expandafter\expandafter\HyColor@@UseColor#1\@nil
\fi
\fi
}
\makeatother

% ========================================================

% Set 3
\definecolor{MK_Three_One}{RGB}{118,42,131}
\definecolor{MK_Three_Two}{RGB}{175,141,195}
\definecolor{MK_Three_Three}{RGB}{231,212,232}
\definecolor{MK_Three_Four}{RGB}{217,240,211}
\definecolor{MK_Three_Five}{RGB}{127,191,123}
\definecolor{MK_Three_Six}{RGB}{27,120,55}

%setup new colors 3
\hypersetup{
 linkcolor=MK_Three_One
,citecolor=MK_Three_Two
,filecolor=MK_Three_Three
,urlcolor= MK_Three_Six
,menucolor=MK_Three_Five
,runcolor=MK_Three_Four
,linkbordercolor=MK_Three_One
,citebordercolor=MK_Three_Two
,filebordercolor=MK_Three_Three
,urlbordercolor=MK_Three_Six
,menubordercolor=MK_Three_Five
,runbordercolor=MK_Three_Four
}

\section{Proposal 3}
\subsection{Colorlinks}

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkcolor}         & \ref{sec} \\\\
 \texttt{citecolor}         & \cite{cite} \\\\
 \texttt{filecolor}         & \href{example-image.pdf}{file}\\\\
 \texttt{urlcolor}          & \url{https://www.latex-project.org/}\\\\
 \texttt{menucolor}         & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runcolor}          & \href{run:sumatra}{run something}
\end{tabular}

\subsection{Borders}
\makeatletter
\def\@pdfborder{1 1 1} 
\def\HyColor@UseColor#1{}
\makeatother

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkbordercolor}   & \ref{sec} \\\\
 \texttt{citebordercolor}   & \cite{cite} \\\\
 \texttt{filebordercolor}   & \href{example-image.pdf}{file}\\\\
 \texttt{urlbordercolor}    & \url{https://www.latex-project.org/}\\\\
 \texttt{menubordercolor}   & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runbordercolor}    &  \href{run:sumatra}{run something}
\end{tabular}

\makeatletter
\def\@pdfborder{0 0 0} 
\def\HyColor@UseColor#1{%
\ifx\relax#1\@empty
\else
\ifx\@empty#1\@empty
\else
\expandafter\expandafter\expandafter\HyColor@@UseColor#1\@nil
\fi
\fi
}
\makeatother

% ========================================================

% Set 4
\definecolor{MK_Two_One}{RGB}{178,24,43}
\definecolor{MK_Two_Two}{RGB}{239,138,98}
\definecolor{MK_Two_Three}{RGB}{253,219,199}
\definecolor{MK_Two_Four}{RGB}{209,229,240}
\definecolor{MK_Two_Five}{RGB}{103,169,207}
\definecolor{MK_Two_Six}{RGB}{33,102,172}

%setup new colors 4
\hypersetup{
 linkcolor=MK_Two_One
,citecolor=MK_Two_One
,filecolor=MK_Two_Two
,urlcolor= MK_Two_One
,menucolor=MK_Two_Six
,runcolor=MK_Two_Five
,linkbordercolor=MK_Two_One
,citebordercolor=MK_Two_Two
,filebordercolor=MK_Two_Three
,urlbordercolor=MK_Two_Six
,menubordercolor=MK_Two_Five
,runbordercolor=MK_Two_Four
}

\section{Proposal 4}
\subsection{Colorlinks}

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkcolor}         & \ref{sec} \\\\
 \texttt{citecolor}         & \cite{cite} \\\\
 \texttt{filecolor}         & \href{example-image.pdf}{file}\\\\
 \texttt{urlcolor}          & \url{https://www.latex-project.org/}\\\\
 \texttt{menucolor}         & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runcolor}          & \href{run:sumatra}{run something}
\end{tabular}

\subsection{Borders}
\makeatletter
\def\@pdfborder{1 1 1} 
\def\HyColor@UseColor#1{}
\makeatother

\begin{tabular}{lll}
 Type                       & Example   \\\hline\\
 \texttt{linkbordercolor}   & \ref{sec} \\\\
 \texttt{citebordercolor}   & \cite{cite} \\\\
 \texttt{filebordercolor}   & \href{example-image.pdf}{file}\\\\
 \texttt{urlbordercolor}    & \url{https://www.latex-project.org/}\\\\
 \texttt{menubordercolor}   & \Acrobatmenu{View}{View Something}\\\\
 \texttt{runbordercolor}    &  \href{run:sumatra}{run something}
\end{tabular}

\makeatletter
\def\@pdfborder{0 0 0} 
\def\HyColor@UseColor#1{%
\ifx\relax#1\@empty
\else
\ifx\@empty#1\@empty
\else
\expandafter\expandafter\expandafter\HyColor@@UseColor#1\@nil
\fi
\fi
}
\makeatother

\begin{thebibliography}{99}
\bibitem{cite} some text
\end{thebibliography}

\end{document}

enter image description here enter image description here enter image description here enter image description here

3
  • 2
    sorry I forgot. I choose a default, so that won't change, but I also added all suggestions as "colorscheme" options to the new hyperref driver. So if you make a concrete suggestion I will consider it. Commented Jul 11, 2021 at 14:34
  • @UlrikeFischer I tried to make three proposals. Not sure how useful they are :). Commented Jul 12, 2021 at 0:26
  • 1
    Maybe it is clever to have the same color for links, URLs, and cites since they are typically easily distinguishable. What do u think? Commented Jul 12, 2021 at 0:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .