[Tex/LaTex] Color gradient in tikzpicture from top to bottom corner

colorgradienttikz-pgf

Is there the possiblity to make a color gradient in the rectangular box in the following example from the bottom left to the top right corner (both in linear or radial shape)?

\documentclass{article}
\usepackage{tikz}

\usepackage{xcolor}

\definecolor{left} {HTML}{001528}

\begin{document}

  \begin{tikzpicture}[remember picture,overlay]
    \node [rectangle, left color=left, right color=left!30!white, anchor=north, minimum width=\paperwidth, minimum height=5.5cm] (box) at (current page.north){};
  \end{tikzpicture}



\end{document}

Thanks for your help!

Best Answer

You can use shading = axis and shading angle=135

\documentclass{article}
\usepackage{tikz}

\definecolor{left} {HTML}{001528}

\begin{document}

  \begin{tikzpicture}[remember picture,overlay]
    \node [shading = axis,rectangle, left color=left, right color=left!30!white,shading angle=135, anchor=north, minimum width=\paperwidth, minimum height=5.5cm] (box) at (current page.north){};
  \end{tikzpicture}
\end{document}

enter image description here