18

Is anyone aware if it's possible to change an entire document's background to a fading color?

In other words, can you take silver and slowly fade it to white from left to right and have this same effect throughout the entire document? I understand I could probably take Inkscape, make an image and put a background image for each page. I cannot find anything native which works so far.

Note that this is for a normal report based document and not for a beamer presentation.

23
\documentclass[x11names]{report}
\usepackage{background}
\usepackage{blindtext}
\backgroundsetup{
scale=1,
angle=0,
opacity=1,
contents={\begin{tikzpicture}[remember picture,overlay]
 \path [left color = Gold2,middle color = Gold2!30, right color = white] (current page.south west)rectangle (current page.north east);   % Adjust the position of the logo.
\end{tikzpicture}}
}
\begin{document}
\blinddocument

\end{document}

enter image description here

I have chosen a conspicuous color. You may choose any color of your choice.

  • 1
    @trentonknight: Glad it helped. Thanks are better conveyed by upvoting and accepting the answer (by clicking thegreen check mark below the votecount) that helped you most. That is the tradition followed here in TeX.SX. – user11232 Nov 16 '12 at 22:04
  • 1
    @user11232 If I run "pdflatex" twice on your answer file I get the right color you exhibit above, but if I run "xelatex" twice only a 1/4 of the page is painted! Why is it so? – Paulo Ney Sep 16 '16 at 5:27
  • How to background this way just one page (the cover)? – tatojo Mar 2 at 14:17
  • Oh, I see: \usepackage[firstpage=true]{background} – tatojo Mar 2 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.