# How to change the color of symbols (mobile, email, homepage, etc) in moderncv?

I'm able to style the contents (color, font size), but I can't change the color of the symbol.

Here's the code I'm working with:

\documentclass[10pt,a4paper]{moderncv}
\moderncvtheme[blue]{classic}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}

\firstname{François}
\familyname{Tessier}
\title{Concepteur / Développeur}
\mobile{\color{light-blue}{+44000000000}}
\email{mymail@mail.com}

\begin{document}
\maketitle

\end{document}


Also, for some reason I can't style the email at all, I can't change the color, fontsize etc. But it works with address, mobile, title etc. Could it be something to do with the @ symbol?

-
Welcome to TeX.sx! –  texenthusiast May 2 '13 at 3:05
–  rickhg12hs May 2 '13 at 3:14
@texenthusiast thank you –  user2130426 May 2 '13 at 3:39
Do you want to change the color of only the links, or of the whole personal information section? –  Xavier May 2 '13 at 3:48

As it is now, there is unfortunately no elegant solution to do that (yet) :(

The color of the personal information section is controlled by a color called color2, the secondary color of each color scheme (after the primary color color1, while color0 controls the color of the main text (black)).

So you could simply redefine that color, anywhere after \moderncvcolor (or the deprecated \moderncvtheme) and before \makecvtitle / \maketitle, by:

\definecolor{color2}{rgb}{0.50,0.33,0.80}


This will however also change the color of the other elements that rely on color2, such as the rendering of \title (on top of my mind, it is actually the only other element that depends on it in the "classic" style variant). A hacky way to counter that is to force the color of \title through its argument.

Putting it together:

\documentclass[10pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[scale=0.8]{geometry}

\colorlet{titlecolor}{color2}% save the secondary color before redefining it
\definecolor{color2}{rgb}{0.50,0.33,0.80}% redefine the secondary color to purple

\firstname{François}
\familyname{Tessier}
\title{\textcolor{titlecolor}{Concepteur / Développeur}}% force to render the title in the previously saved original secondary color
\mobile{+44000000000}
\email{mymail@mail.com}

\begin{document}
\makecvtitle
\end{document}


yields

-
Thank you, this is a clever solution. –  user2130426 May 2 '13 at 15:44
Also, do you know how to further style this personal info section and remove the italics? I'd rather the font was styled normally. –  user2130426 May 2 '13 at 15:54
@user2130426 Just redefine \addressfont –  Xavier May 2 '13 at 17:50

Yes, the mobile symbol is set before the mobile number. As such, your definition - that includes \color - changes the colour too late. You need to add the colour to the mobile symbol and it will flow through to the mobile number as well:

\makeatletter
\protected@edef\mobilesymbol{\protect\color{blue}\mobilesymbol}
\makeatother


To change the colour of other personal content on a case-by-case basis, you need to update \addressymbol, \@addresscity, \@addresscountry, [\mobilesymbol,] \phonesymbol, \faxsymbol, \emailsymbol, \homepagesymbol and/or \@extrainfo.

-
I see, thank you. Can you tell me where in that code I should enter the mobile number? –  user2130426 May 2 '13 at 15:41
@user2130426 As usual, use \mobile{+44000000000} in your preamble –  Xavier May 2 '13 at 15:45

Use

\definecolor{color2}{RGB}{0,0,128}


to change the line, then override again for the actual text, like so:

\definecolor{mediumgrey}{RGB}{128,128,128}
\mobile{\color{mediumgrey}{+44000000000}}


Take a look at this example of mine: Resume template with leading line to start section

-
Basically, what Xavier says. –  Ingmar May 2 '13 at 6:31