# Change color in hypersetup/hyperref

\documentclass[5p]{elsarticle}

\usepackage{hyperref}
\hypersetup{colorlinks = true, allcolors = blue}

\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

• The period in your figure should probably be part of the caption. Also use don't use [H] as default placement specifier for your floats, this only results in many badly placed images and tables. Personally I would not use subfig but subcaption. If this should be two authors in the screenshot of your bib entry, then the syntax is wrong. Jan 9 '18 at 15:48

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}

\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}

• It worked for me. Is it possible to change the color of the bracket [ ] from black to cyan? Thank you again Jan 10 '18 at 6:27
• @Prakash Can you ask for the bracket colour in a new questions, including a minimal working example with bibliography (MWEB)? I don't have your bib file (and will not retype it from your picture), thus can not compile this part of your document. Jan 10 '18 at 9:20
• I asked the new question. please check it. thank you Jan 10 '18 at 10:07