20

Unfortunately, I'm not able to find this information in moderncv.cls...

There is only written:

% colors
%-------
\definecolor{color0}{rgb}{0,0,0}% main default color, normally left to black
\definecolor{color1}{rgb}{0,0,0}% primary scheme color
\definecolor{color2}{rgb}{0,0,0}% secondary scheme color
\definecolor{color3}{rgb}{0,0,0}% tertiary scheme color

I think [rgb]{0,0,0} is black in every case? What is the difference between color2 and color2!50?

How does it work with those nice grey colors for the first name and the family name letters in the casual-style? And where do I get the hex-codes for those colors?

1 Answer 1

28

If you use the moderncv class, there is no need to specify a colour scheme. So, by default, the colour scheme is black (or {rgb}{0,0,0}). That's what is contained in moderncv.cls:

% colors
%-------
\definecolor{color0}{rgb}{0,0,0}% main default color, normally left to black
\definecolor{color1}{rgb}{0,0,0}% primary scheme color
\definecolor{color2}{rgb}{0,0,0}% secondary scheme color
\definecolor{color3}{rgb}{0,0,0}% tertiary scheme color

However, if you choose a specific colour scheme, these colours are (re)defined to be something else.

Black / moderncvcolorblack.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0,0,0}% black
\definecolor{color2}{rgb}{0,0,0}% black

Actually, nothing new here, but I'm showing it just for completeness.

Blue / moderncvcolorblue.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.22,0.45,0.70}% light blue
\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey

Green / moderncvcolorgreen.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.35,0.70,0.30}% green
\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey

Grey / moderncvcolorgrey.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.55,0.55,0.55}% dark grey
\definecolor{color2}{rgb}{0.55,0.55,0.55}% dark grey

Orange / moderncvcolororange.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.95,0.55,0.15}% orange
\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey

Purple / moderncvcolorpurple.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.50,0.33,0.80}% purple
\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey

Red / moderncvcolorred.sty:

\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.95,0.20,0.20}% red
\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey

The "tertiary colour scheme" is never used, even though it is defined.

4
  • Thanks a lot for your quick answer! But where do I get the codes for the pre-specified colors of firstname and familyname? I really like those colors and I want to use them in other documents, too... What font and which size is it?
    – Dave
    May 23, 2015 at 20:14
  • @Dave: Inside the \makecvtitle macro you'll see the family/last name uses color2 while the first name uses color2!50 (50% of color2). In your other documents, add \usepackage{xcolor} \definecolor{color1}{rgb}{X,X,X} \colorlet{color2}{color1!50} to obtain two colours you can use. Of course, as is shown above, color1 and color2 depend on the colour scheme you choose for your CV. The font is the regular Computer Modern font (available by default) and the size is \namefont (defined to be \fontsize{38}{40}\mdseries\upshape under the casual style).
    – Werner
    May 23, 2015 at 20:49
  • Aaah, okay, I understood! Thank you very much! I have been looking for the color-codes only inside the black style, and everything there is (0,0,0)... However, the orange style uses different colors. Thanks Werner!
    – Dave
    May 23, 2015 at 21:09
  • @Dave: Yes, hence the use of themes, so you don't have to worry about the different colour choices; they have been preselected to look good together.
    – Werner
    May 23, 2015 at 21:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .