[Tex/LaTex] Change color in hypersetup/hyperref

elsarticlehyperref

\documentclass[5p]{elsarticle}


\usepackage{hyperref}
\hypersetup{colorlinks = true, allcolors = blue}
\usepackage[nameinlink,noabbrev]{cleveref} 



\Crefformat{figure}{#2Fig.~#1#3}
\Crefmultiformat{figure}{Figs.~#2#1#3}{ and~#2#1#3}{, #2#1#3}{ and~#2#1#3}


\usepackage{lineno}
\modulolinenumbers[5]


\journal{Journal of \LaTeX\ Templates}



\usepackage{subfig}
\usepackage{float}
\usepackage{graphicx}
\usepackage{color}
\usepackage{pgf,tikz}
\usepackage{multirow}



\usepackage{amsmath,amsfonts,amsthm,bm}


\bibliographystyle{elsarticle-num}
%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

\captionsetup[figure]{labelfont={bf},labelformat={default},labelsep=period,name={Fig.}}%used to ref Figure 1: to Fig.1.

\section{Introduction}


In  \Cref{figure}, in ref \cite{allik_hughes_1}, in \Cref{table}  and in equation Eq. \ref{equation}



\begin{align}
M=\frac{a{b}c}{2}. dE, \label{equation}
\end{align}


\begin{figure}[H]
\centering
  \includegraphics[height=1.0 in, width=2.0 in]{bimorph_series_no_metal.png} 
\caption{Static deflection of the bimorph actuator: Accuracy analysis} \label{figure}.
\end{figure}

\begin{table}[H]
%\begin{table}[H]
\caption{Accuracy : Static } \label{table}
\centering
\begin{tabular}{c c c c c c}
\hline 
\multirow{3}{*}{none} &\multicolumn{2}{c}{none}\\ \cline{2-3}&a($\mu$m)&relative error[\%]\\ \cline{2-3} \cline{4-5}
&b&b\\
\hline
1000&1000&100& \\ 
\hline
\end{tabular}
%\end{table}
\end{table}

\section*{References}
\bibliography{mybibfile}


\end{document}  

Hello, I would like to change the color of cross-references and doi in references from blue to cyan. I tried \hypersetup{colorlinks = true, allcolors = cyan} many another color in place of blue, still I get blue. Find the mybibfile in the attachment
Thank you in advance

enter image description here

enter image description here

Best Answer

You could use \hypersetup{allcolors = cyan} after \begin{document} to change all links to cyan.

\documentclass[5p]{elsarticle}

\usepackage{hyperref}
\hypersetup{colorlinks = true, allcolors = cyan}
\usepackage[nameinlink,noabbrev]{cleveref} 

\begin{document}

\hypersetup{allcolors = cyan}

\Cref{figure}

\begin{figure}[htbp]
\caption{Static deflection of the bimorph actuator: Accuracy analysis.} \label{figure}
\end{figure}

\end{document}  
Related Question