\documentclass{book}
\usepackage{fancyhdr,xcolor}
\makeatletter
\def\headrule{{\color{red}\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi
    \hrule\@height\headrulewidth\@width\headwidth
\vskip-\headrulewidth}}
\makeatother

\pagestyle{fancy}

\begin{document}

\section{one}
text
\clearpage
text

\end{document}
