## LaTeX forum ⇒ Page Layout ⇒ Changing background color of just 1 page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
martacl
Posts: 2
Joined: Fri Feb 27, 2009 5:57 pm

### Changing background color of just 1 page

Hi,

I would like to change the background color of one page of my document. I thought I would do by creating a minipage and defining its background color, but I don't know how to do it.
I've tried by definint a box (mbox, fbox, makebox,...) but all of them define a box "inside" the page but leave the margins de same color as the rest of the document.
Anybody can help me?

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Hi,

you can use the \pagecolor command provided by the xcolor package; please refer to the package documentation for further information. A little example:
\documentclass{article}\usepackage{xcolor}\usepackage{lipsum}%just to generate some text \begin{document} \lipsum[1-4]\newpage \pagecolor{purple!30}\lipsum[1-4] \newpage\pagecolor{white}\lipsum[1-4] \end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

martacl
Posts: 2
Joined: Fri Feb 27, 2009 5:57 pm
Thanks! It works fine!