Currently I am using the following code to give my Section Numbers a different colour (I am using the xcolor package):
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\definecolor{darkmidnightblue}{rgb}{0, 0.2, 0.4}
\makeatletter
\renewcommand\@seccntformat[1]{\color{darkmidnightblue} {\csname
the#1\endcsname}\hspace{0.5em}}
\makeatother
\begin{document}
\section{\textcolor{darkmidnightblue}{Section}}
\subsection{\textcolor{MidnightBlue}{Subsection}}
\end{document}
However, I understand that as it is, it also applies the same scheme to the other section levels. I am trying to make the Subsection have a different colour to the Section, but it turns out like this:
I would like the Subsection Number to be the same colour as the text. Can this code be modified to alter each section level independently, or will I need to use different commands altogether?
Elliot
