Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FontAwesome - Change Icon colours Latex

came across FontAwesome icon package. When shifting through the documentation I cam across:

{\color{color-name} text and/or icon }

However, this does not seem to work for me. Anyone know what is the correct format for changing the colour of icons?

Thanks

EDIT:

\documentclass[border=0.1cm]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{fontawesome5}
\usepackage[hidelinks]{hyperref}


\begin{document}

\begin{minipage}[t]{0.275\textwidth} % 27.5% of the page width for the first row of icons
    \vspace{-\baselineskip} % Required for vertically aligning minipages
    {\color{Blue} \icon{Globe}{12}{\href{someAddress}{someAdd}}}\\

\end{minipage}

\end{document}
    
like image 361
pb. Avatar asked Oct 15 '25 03:10

pb.


1 Answers

  • if you want to use \href, you must load the hyperref package

  • you are opening one more { than you are closing

  • if you want to use an icon from fontawsome5, either use \fa<insert name here> or \faIcon{<insert name here>}, e.g. \fGlobe in your case.


\documentclass[border=1cm]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{hyperref}
\usepackage{fontawesome5}

\begin{document}

\begin{minipage}[t]{0.275\textwidth} % 27.5% of the page width for the first row of icons
    \vspace{-\baselineskip} % Required for vertically aligning minipages
    {\color{Blue} \faGlobe \faIcon{globe} \href{someAddress}{someAdd} }\\

\end{minipage}


\end{document}

enter image description here

like image 81
samcarter_is_at_topanswers.xyz Avatar answered Oct 19 '25 07:10

samcarter_is_at_topanswers.xyz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!