21

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.

2

1 Answer 1

28
\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.

4
  • 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, 2012 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, 2016 at 5:27
  • How to background this way just one page (the cover)?
    – tatojo
    Mar 2, 2019 at 14:17
  • Oh, I see: \usepackage[firstpage=true]{background}
    – tatojo
    Mar 2, 2019 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .