I try to generate a tableofcontents which I will get, but the color of the numbering+text for sections, subsections is different than the color of the pagenumber. What am I doing wrong ? Am I using the right packages, or too many packages, or not in the right order?
My code looks like :
\documentclass[twoside]{article}
% Packages required
\usepackage{calc}
\usepackage{doxygen}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage[table]{xcolor}
%\usepackage{color}
% Font selection
\usepackage[T1]{fontenc}
\usepackage{mathptmx} %
\usepackage[scaled=.90]{helvet} %
\usepackage{courier} %
\usepackage{amssymb}
\usepackage{sectsty}
\renewcommand{\familydefault}{\sfdefault}
%
\usepackage{float} % for the "pageanchor"
\usepackage[titles]{tocloft} % Einrücken
\tocloftpagestyle{fancy}
% Headers & footers
\usepackage{fancyhdr} % making use of the fancy-package
\pagestyle{fancy}
%
\usepackage{titletoc}
\usepackage{titlesec}
%
\titlespacing{\section}{0pt}{0cm}{1cm} % move the "next" text a little bit down
\titlespacing{\subparagraph}{0pt}{0pt}{0pt}
%
\titleformat{name=\section}[hang]{\color{black}\hrule\vspace{-1cm}}{\cmssbx\color{blue}\thesection}{1.8em}{\cmssbx\color{blue}}{\cmssbx\color{blue}}
%
\let\stdsection\section
\renewcommand{\section}{\newpage\stdsection} % start every section on a new page
%================================
\begin{document}
\tableofcontents
