pb.
pb.

Reputation: 135

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}
    

Upvotes: 4

Views: 6552

Answers (1)

  • 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

Upvotes: 4

Related Questions