# how to color the header's bottom line or footer's upper line?

The title is self-explanatory.

In my document's current state, I get this rendering result after compiling with XeLaTeX :

Here's a MWE of which packages and commands I use to obtain my current header style :

\documentclass{report}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}

\usepackage{lipsum}% http://www.ctan.org/tex-archive/macros/latex/contrib/lipsum

\usepackage{titlesec}
\usepackage{xcolor}

\renewpagestyle{plain}[\small\sffamily\upshape\color{red}]{
}

\author{ME}
\title{Bash report}

\pagestyle{plain}
\begin{document}
\maketitle

\tableofcontents
\thispagestyle{empty}

\chapter{Matrices de convolution}
\lipsum

\lipsum
\end{document}


What I actually would like is to color "red" the lines created by the header and footer.

-

titlesec defines helper macros to set up the lines, this drops red into the head line

\documentclass{report}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}

\usepackage{lipsum}% http://www.ctan.org/tex-archive/macros/latex/contrib/lipsum

\usepackage{titlesec}
\usepackage{xcolor}

\makeatletter

\ifdim#1=\z@
\else
\fi}

\makeatother

\renewpagestyle{plain}[\small\sffamily\upshape]{
}

\author{ME}
\title{Bash report}

\pagestyle{plain}
\begin{document}
\maketitle

\tableofcontents
\thispagestyle{empty}

\chapter{Matrices de convolution}
\lipsum

\lipsum
\end{document}


The foot rule command is by default

\newcommand\setfootrule[1]{%
\ifdim#1=\z@
\let\makefootrule\@empty
\else
\def\makefootrule{\rule[.7\baselineskip]{\linewidth}{#1}}%
\fi}


But not apparently used in this MWE so I didn't change it/

-
I have an error if I insert the hack that you wrote in my current document state, I get the following compilation error (using XeLaTeX) : ! LaTeX Error: Command \setheadrule already defined. Or name \end... illegal, see p.192 of the manual. –  발렌탕 Feb 22 '13 at 20:31
I just added [pagestyles] to the \usepackage{titlesec} inclusion, works fine now. –  발렌탕 Feb 22 '13 at 20:38