我想使用与网络上显示的图标相同的颜色。例如,我希望我的 LinkedIn 图标为蓝色,而不是暗灰色。我该如何实现?
答案1
图标的定义可以在moderncviconsawesome.sty
(使用默认设置)中找到。您可以修改这些定义以向图标添加颜色。
原始定义:
\renewcommand*{\mobilephonesymbol} {{\Large\faMobile}~}
\renewcommand*{\fixedphonesymbol} {\faPhone~}
\renewcommand*{\faxphonesymbol} {{\small\faFax}~} % alternative: \faPrint
\renewcommand*{\emailsymbol} {{\small\faEnvelopeO}~} % alternative: \faInbox
\renewcommand*{\homepagesymbol} {{\small\faGlobe}~} % alternative: \faHome
\renewcommand*{\linkedinsocialsymbol}{{\small\faLinkedin}~} % alternative: \faLinkedinSquare
\renewcommand*{\twittersocialsymbol} {{\small\faTwitter}~} % alternative: \faTwitterSquare
\renewcommand*{\githubsocialsymbol} {{\small\faGithub}~} % alternative: \faGithubSquare, \faGithubSquare
将 LinkedIn 颜色更改为蓝色的 MWE:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[xing]{john\_doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\social[gitlab]{jdoe}
\social[skype]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\renewcommand*{\linkedinsocialsymbol}{{\color[HTML]{074786}\small\faLinkedin}~}
\begin{document}
\makecvtitle
\end{document}
结果: