[Tex/LaTex] Set color of title page with memoir

colormemoir

I'm writing a report with memoir and would like to set the color of the title page. The pagecolor package looks promising but I can't figure out how to set the color of only the first of two pages in a twoside report.

As an example, here's a MWE but notice how the first two pages are red.

\documentclass{memoir}

\usepackage{lipsum}
\usepackage{pagecolor}
\title{Test}

\begin{document}

\newpagecolor{red}
\begin{titlingpage}
  \maketitle
\end{titlingpage}

\newpagecolor{white}
\chapter{First chapter}
\lipsum[1]

\end{document}

Any ideas?

Best Answer

You can use afterpage package :

\documentclass{memoir}

\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{pagecolor}
\usepackage{afterpage}

\title{Test}
\author{flav}
\begin{document}

 \newpagecolor{gray}\afterpage{\restorepagecolor}
 \maketitle

 \chapter{First chapter}
 \lipsum[1]

 \end{document}

see : How to change the background color only for the current page?