# Package xwatermark and page color

I am trying to compile a document, which has (1) a colored back-ground of its pages and (2) a watermark. However, when I try to use the package xwatermark, it annihilates the colored background of pages. Does anyone know the workaround for this problem? Please, see an example of code below:

\documentclass[oneside,a4paper,14pt]{extreport}
\usepackage{fontspec}
\usepackage{libertine} % Font Libertine
\usepackage{polyglossia}
\usepackage{microtype}
\setmainlanguage{english}
\usepackage{vmargin}
\setmarginsrb{2cm}{1.5cm}{2cm}{1cm}{0pt}{0mm}{0pt}{13mm}
\usepackage{lipsum}

\usepackage{color}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
\definecolor{purple}{rgb}{0.41, 0.16, 0.38}

\usepackage[printwatermark]{xwatermark}
\newwatermark[allpages,color=purple,angle=45,scale=4,xpos=0,ypos=0]{Draft}

\begin{document}
\pagecolor{anti-flashwhite}
\lipsum[1-5]
\end{document}


pagecolor works. Watermark works, and is quite purple-y, as defined.

I can barely see such a light shade of gray, though, but it is there:

The documentation makes a mention about when values hit such extreme ranges. There may also be, I think, a dependency on the PDF viewer, and the zoom.

A scale bar, stepping through the shades:

Note how both ends are similar, in terms of distinguishing the grading. Non-linear.

There will definitely be something to consider at the printer's. Try some test pages.

MWE

\documentclass[oneside,a4paper,14pt]{extreport}
\usepackage{tikz}
\usepackage{libertine} % Font Libertine
\usepackage{vmargin}
\setmarginsrb{2cm}{1.5cm}{2cm}{1cm}{0pt}{0mm}{0pt}{13mm}

\usepackage{xcolor}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
\definecolor{purple}{rgb}{0.41, 0.16, 0.38}

\definecolor{tca}{rgb}{1, 1, 1}
\definecolor{tcb}{rgb}{0.95, 0.95, 0.96}
\definecolor{tcc}{rgb}{0.90, 0.90, 0.90}
\definecolor{tcd}{rgb}{0.85, 0.85, 0.85}
\definecolor{tce}{rgb}{0.80, 0.80, 0.80}
\definecolor{tcf}{rgb}{0.75, 0.75, 0.75}
\definecolor{tcg}{rgb}{0.70, 0.70, 0.70}
\definecolor{tch}{rgb}{0.65, 0.65, 0.65}
\definecolor{tci}{rgb}{0.60, 0.60, 0.60}
\definecolor{tcj}{rgb}{0.55, 0.55, 0.55}
\definecolor{tck}{rgb}{0.50, 0.50, 0.50}
\definecolor{tcl}{rgb}{0.45, 0.45, 0.45}
\definecolor{tcm}{rgb}{0.40, 0.40, 0.40}
\definecolor{tcn}{rgb}{0.35, 0.35, 0.35}
\definecolor{tco}{rgb}{0.30, 0.30, 0.30}
\definecolor{tcp}{rgb}{0.25, 0.25, 0.25}
\definecolor{tcq}{rgb}{0.20, 0.20, 0.20}
\definecolor{tcr}{rgb}{0.15, 0.15, 0.15}
\definecolor{tcs}{rgb}{0.10, 0.10, 0.10}
\definecolor{tct}{rgb}{0.05, 0.05, 0.05}
\definecolor{tcu}{rgb}{0, 0, 0}

\usepackage[printwatermark]{xwatermark}
\newwatermark[allpages,color=purple,angle=45,scale=4,xpos=0,ypos=0]{Draft}

\newcommand\mysize{0.55cm}

\begin{document}
\pagecolor{red!35!yellow!80}
\colorbox{anti-flashwhite}{anti-flashwhiteThe cat sat on the mat.}

The \colorbox{white}{cat sat }on the mat.

\colorbox{anti-flashwhite}{anti-flashwhiteThe cat sat on the mat.}

\noindent
\fbox{\colorbox{tca}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcb}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcc}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcd}{\makebox[\mysize]{}}}
\fbox{\colorbox{tce}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcf}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcg}{\makebox[\mysize]{}}}
\fbox{\colorbox{tch}{\makebox[\mysize]{}}}
\fbox{\colorbox{tci}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcj}{\makebox[\mysize]{}}}
\tikz{\node[overlay,xshift=0.5cm,yshift=-1.65\baselineskip,inner sep=0pt]{\fbox{\colorbox{tck}{\makebox[\mysize]{}}}}}

\noindent
\fbox{\colorbox{tca}{\makebox[\mysize]{1}}}
\fbox{\colorbox{tcb}{\makebox[\mysize]{0.95}}}
\fbox{\colorbox{tcc}{\makebox[\mysize]{0.90}}}
\fbox{\colorbox{tcd}{\makebox[\mysize]{0.85}}}
\fbox{\colorbox{tce}{\makebox[\mysize]{0.80}}}
\fbox{\colorbox{tcf}{\makebox[\mysize]{0.75}}}
\fbox{\colorbox{tcg}{\makebox[\mysize]{0.70}}}
\fbox{\colorbox{tch}{\makebox[\mysize]{0.65}}}
\fbox{\colorbox{tci}{\makebox[\mysize]{0.60}}}
\fbox{\colorbox{tci}{\makebox[\mysize]{0.55}}}
\tikz{\node[overlay,xshift=0.5cm,yshift=-1.25\baselineskip,inner sep=0pt]{\fbox{\colorbox{tck}{\makebox[\mysize]{0.50}}}}}

\noindent
\fbox{\colorbox{tcu}{\makebox[\mysize]{}}}
\fbox{\colorbox{tct}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcs}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcr}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcq}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcp}{\makebox[\mysize]{}}}
\fbox{\colorbox{tco}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcn}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcm}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcl}{\makebox[\mysize]{}}}

\noindent
\fbox{\colorbox{tcu}{\makebox[\mysize]{\textcolor{white}{0}}}}
\fbox{\colorbox{tct}{\makebox[\mysize]{\textcolor{white}{0.05}}}}
\fbox{\colorbox{tcs}{\makebox[\mysize]{\textcolor{white}{0.10}}}}
\fbox{\colorbox{tcr}{\makebox[\mysize]{\textcolor{white}{0.15}}}}
\fbox{\colorbox{tcq}{\makebox[\mysize]{\textcolor{white}{0.20}}}}
\fbox{\colorbox{tcp}{\makebox[\mysize]{\textcolor{white}{0.25}}}}
\fbox{\colorbox{tco}{\makebox[\mysize]{\textcolor{white}{0.30}}}}
\fbox{\colorbox{tcn}{\makebox[\mysize]{\textcolor{white}{0.35}}}}
\fbox{\colorbox{tcm}{\makebox[\mysize]{\textcolor{white}{0.40}}}}
\fbox{\colorbox{tcl}{\makebox[\mysize]{\textcolor{white}{0.45}}}}

\end{document}


• Thank you for the reply! I finally figured - it was some add problem with LuaLaTeX. The "anti-flashwhite" is very useful for setting documents, for it is much easier on eyes than pure white. – user136555 Jun 11 '20 at 3:58
• Good news on the solution. When my screen goes into night mode, anti-flashwhite is quite visible; in day mode, I can barely see it's there. Interesting. – Cicada Jun 11 '20 at 9:32