[Tex/LaTex] How are the colors for certain schemes defined in moderncv

colormoderncv

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?

Best Answer

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.