I found that I can change current pagecolor with
\newpagecolor{color}\afterpage{\restorepagecolor}
so I tried to use
\newpagecolor{color}\newpagecolor{color}\afterpage{\restorepagecolor}
,
that unfortunately changes the color for all pages after this command. Any ideas how to limit this command only to the current and the next page?
\newpagecolor{color}
after\newpagecolor
is wrong since the restore color is overwritten with that value, so if the previous colour waswhite
, and\newpagecolor{red}
is used, then\restorepagecolor
would restore to white, since this is the previous color information.\newpagecolor{red}\newpagecolor{red}
would first savewhite
, but then then 2nd usage would savered
, so\restorepagecolor
would restore to red for the rest of the document (or until another\newpagecolor
is used)