[Tex/LaTex] How to change the color of the foot page using fancyhdr package


I'm using "facyhdr" to add a footer on all my pages, and I also use the extension "etoolbox" to color it, but the problem is that it also color the page number, do you know how to color only the footer ?

Here is the code I'm using:



Thank you

Best Answer

From your code it looks like you want to color the foot rule and the word confidential, but not the page number that also appears in the footer. To color the the foot rule you want to append \color{green} to it. That can be dome as in the previous answer, or as below which gives roughly the same result but without knowing the definition of \footrule. Then, you can put in whatever you like in the header and footer, so why not color it directly?

\subsection{First sub}

This gives the footer below.

enter image description here

Related Question