# change the color of the footer in the first page of the fancy

I am using this to change the color of the headers and footer of the chapter pages in the fancy page style, which I got from another post.

     \usepackage{etoolbox}

\makeatletter
\patchcmd{\@fancyhead}{\rlap}{\color{ared}\rlap}{}{}
\patchcmd{\headrule}{\hrule}{\color{ared}\hrule}{}{}
\patchcmd{\@fancyfoot}{\rlap}{\color{ared}\rlap}{}{}
\patchcmd{\footrule}{\hrule}{\color{ared}\hrule}{}{}
\makeatother


however, the in the first page of every chapter, the page number remains in black. I have tried modifying the \fancypagestyle{plain} but so far not results.

Does anyone have a suggestion on how to successfully change the first chapter page footer color?

I am using the memoir document class.

• (1) Welcome, (2) you should not really be using fancyhdr with memoir, it has its own heavily integrated system for handling headers. (3) On this site we prefer full minimal examples can that be copied and tested without having to add anything. – daleif May 10 '16 at 12:52

## 1 Answer

Unfortunaly there is no MWE in the question. With memoir you should use the header and footer commands of this class:

 \documentclass{memoir}
\usepackage{blindtext}
\usepackage{xcolor}
\colorlet{ared}{red}

\pagestyle{ruled}
\makeevenhead{ruled}{\leftmark}{}{\rightmark}
\makeoddhead{ruled}{\rightmark}{}{\leftmark}
\makeevenfoot{ruled}{}{\thepage}{}
\makeoddfoot{ruled}{}{\thepage}{}

\makeheadfootruleprefix{ruled}{\color{ared}}{\color{ared}}
\makeheadfootstrut{ruled}{\strut\color{ared}}{\strut\color{ared}}
\makeheadfootstrut{plain}{\strut\color{ared}}{\strut\color{ared}}
\uppercaseheads

\begin{document}
\blinddocument
\blinddocument
\end{document}


With a standard class you can use fancyhdr but then you have to define plain as a fancy page style too:

\documentclass{book}
\usepackage{blindtext}
\usepackage{xcolor}
\colorlet{ared}{red}
\usepackage{etoolbox}
\usepackage{fancyhdr}
\makeatletter
\patchcmd{\@fancyhead}{\rlap}{\color{ared}\rlap}{}{}
\patchcmd{\headrule}{\hrule}{\color{ared}\hrule}{}{}
\patchcmd{\@fancyfoot}{\rlap}{\color{ared}\rlap}{}{}
\patchcmd{\footrule}{\hrule}{\color{ared}\hrule}{}{}
\makeatother

\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[C]{\thepage}
\renewcommand\headrulewidth{0pt}
}

\pagestyle{fancy}
\begin{document}
\blinddocument
\end{document}


Or you could use package scrlayer-scrpage.

\documentclass{memoir}
%\documentclass{book}
\usepackage{blindtext}
\usepackage{xcolor}
\colorlet{ared}{red}

\usepackage[automark,headsepline,markcase=upper]{scrlayer-scrpage}
\addtokomafont{pageheadfoot}{\color{ared}}
\ohead{\leftmark}
\ihead{\rightmark}
\cfoot*{\pagemark}

\begin{document}
\blinddocument
\blinddocument
\end{document}

• The OP is using memoir. – Werner May 11 '16 at 0:19
• @Werner There is also a suggestion for memoir(without fancyhdr) in my answer including a colored headsepline. – esdd May 11 '16 at 0:35
• Ahhh, I see now. Missed that. – Werner May 11 '16 at 0:39