I'would like to add different colors in my TOC, depending on the chapter. I've a color for the header, section subsection of each chapter (red chapter one, blue chapter two etc...). With this code I can change colors of chapter name, section and subsection, but this style is the same of all the TOC:
\usepackage[svgnames]{xcolor}
\makeatletter
\let\stdl@section\l@section
\renewcommand*{\l@subsection}[2]{%
\stdl@subsection{\it\bf\textcolor{DarkGreen}{#1}}{\it\bf\textcolor{DarkGreen}{#2}}}
\makeatother
I'm a newbie, I would to exprime like an "if chapter==1 \textcolor{DarkGreen}" "if chapter==2 \textcolor{Red}"... Any ideas?
Thankyou in advance.
