The list of colors is controlled by \@sectioncolor
and this just uses an \ifcase
; here's the original definition:
\def\@sectioncolor#1#2#3{%
{%
\color{%
\ifcase\value{colorCounter}%
blue\or%
red\or%
orange\or%
green\or%
purple\or%
brown\else%
headercolor\fi%
} #1#2#3%
}%
\stepcounter{colorCounter}%
}
You can simply define your colors and add them to the list. In the example below I defined two new colors teal and yellow using
\definecolor{teal}{HTML}{008080}
\definecolor{yellow}{HTML}{FFFF00}
\makeatletter
\def\@sectioncolor#1#2#3{%
{%
\color{%
\ifcase\value{colorCounter}%
blue\or%
red\or%
orange\or%
green\or%
purple\or%
brown\or%
teal\or%
yellow\else%
headercolor\fi%
} #1#2#3%
}%
\stepcounter{colorCounter}%
}
\ifdefined\@cv@print
\colorlet{green}{gray}
\colorlet{orange}{gray}
\colorlet{purple}{gray}
\colorlet{brown}{gray}
\colorlet{red}{gray}
\colorlet{blue}{gray}
\colorlet{teal}{gray}
\colorlet{yellow}{gray}
\colorlet{fillheader}{white}
\colorlet{header}{gray}
\else
\colorlet{fillheader}{gray}
\colorlet{header}{white}
\fi
\makeatother
The code:
\documentclass[]{friggeri-cv} % Add 'print' as an option into the square bracket to remove colors from this template for printing
\addbibresource{bibliography.bib} % Specify the bibliography file to include publications
\definecolor{teal}{HTML}{008080}
\definecolor{yellow}{HTML}{FFFF00}
\makeatletter
\def\@sectioncolor#1#2#3{%
{%
\color{%
\ifcase\value{colorCounter}%
blue\or%
red\or%
orange\or%
green\or%
purple\or%
brown\or%
teal\or%
yellow\else%
headercolor\fi%
} #1#2#3%
}%
\stepcounter{colorCounter}%
}
\ifdefined\@cv@print
\colorlet{green}{gray}
\colorlet{orange}{gray}
\colorlet{purple}{gray}
\colorlet{brown}{gray}
\colorlet{red}{gray}
\colorlet{blue}{gray}
\colorlet{teal}{gray}
\colorlet{yellow}{gray}
\colorlet{fillheader}{white}
\colorlet{header}{gray}
\else
\colorlet{fillheader}{gray}
\colorlet{header}{white}
\fi
\makeatother
\begin{document}
\header{john}{smith}{junior business analyst} % Your name and current job title/field
%----------------------------------------------------------------------------------------
% SIDEBAR SECTION
%----------------------------------------------------------------------------------------
\begin{aside} % In the aside, each new line forces a line break
\section{contact}
123 Broadway
City, State 12345
Country
~
+0 (000) 111 1111
+0 (000) 111 1112
~
\href{mailto:[email protected]}{[email protected]}
\href{http://www.smith.com}{http://www.smith.com}
\href{http://facebook.com/johnsmith}{fb://jsmith}
\section{languages}
english mother tongue
spanish \& italian fluency
\section{programming}
{\color{red} $\varheartsuit$} JavaScript
Python, C++, PHP
CSS3 \& HTML5
\end{aside}
\section{education}
\section{experience}
\section{awards}
\section{communication skills}
\section{interests}
\section{publications}
\section{another section}
\section{yet another section}
\end{document}
The output:
If you want to do the modification in the .cls file
, then make a copy of friggeri-cv.cls
, save it as myfiggeri-cv.cls
, and in this new file change the lines
\ProvidesClass{friggeri-cv}[2012/04/30 CV class]
to
\ProvidesClass{myfriggeri-cv}[2012/04/30 CV class]
next change
\ifdefined\@cv@print
\colorlet{green}{gray}
\colorlet{orange}{gray}
\colorlet{purple}{gray}
\colorlet{brown}{gray}
\colorlet{red}{gray}
\colorlet{blue}{gray}
\colorlet{fillheader}{white}
\colorlet{header}{gray}
\else
\colorlet{fillheader}{gray}
\colorlet{header}{white}
\fi
to
\definecolor{teal}{HTML}{008080}
\definecolor{yellow}{HTML}{FFFF00}
\ifdefined\@cv@print
\colorlet{green}{gray}
\colorlet{orange}{gray}
\colorlet{purple}{gray}
\colorlet{brown}{gray}
\colorlet{red}{gray}
\colorlet{blue}{gray}
\colorlet{teal}{gray}
\colorlet{yellow}{gray}
\colorlet{fillheader}{white}
\colorlet{header}{gray}
\else
\colorlet{fillheader}{gray}
\colorlet{header}{white}
\fi
and finally, change
\def\@sectioncolor#1#2#3{%
{%
\color{%
\ifcase\value{colorCounter}%
blue\or%
red\or%
orange\or%
green\or%
purple\or%
brown\else%
headercolor\fi%
} #1#2#3%
}%
\stepcounter{colorCounter}%
}
to
\def\@sectioncolor#1#2#3{%
{%
\color{%
\ifcase\value{colorCounter}%
blue\or%
red\or%
orange\or%
green\or%
purple\or%
brown\or%
teal\or%
yellow\else%
headercolor\fi%
} #1#2#3%
}%
\stepcounter{colorCounter}%
}
save the changes and place myfriggeri-cv.cls
somewhere TeX can find it (the easiest is the current working directory); in your .tex
document now you say
\documentclass{myfriggeri-cv}