1

enter image description here

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows, shapes, positioning}
\begin{document}
\pagestyle{empty}
\pagecolor{blue!50}
\begin{tikzpicture}[remember picture, overlay]
\fill[fill=white]([xshift=23mm, yshift=-23mm]current page.north west)rectangle([xshift=-23mm, yshift=-227mm]current page.north east);
\end{tikzpicture}
\end{document}

[enter image description here][1]

MadyYuvi
  • 13,693
Vishakha
  • 119

1 Answers1

1
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\begin{document}
\pagestyle{empty}
\pagecolor{blue!50}
\begin{tikzpicture}[remember picture, overlay]
\fill[blur shadow={shadow xshift=5pt, shadow yshift=0pt, shadow blur radius=5pt},  white] ([xshift=23mm, yshift=-23mm]current page.north west)rectangle([xshift=-23mm, yshift=-227mm]current page.north east);
\end{tikzpicture}
\end{document}

Top of a white rectangle with blurred shadow

Edit:

Less pronounced shadow:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\begin{document}
\pagestyle{empty}
\pagecolor{blue!20}
\begin{tikzpicture}[remember picture, overlay]
\fill[blur shadow={shadow xshift=5pt, shadow yshift=0pt, shadow blur radius=5pt, shadow opacity=20}, white,
] ([xshift=23mm, yshift=-23mm]current page.north west)rectangle([xshift=-23mm, yshift=-227mm]current page.north east);
\end{tikzpicture}
\end{document}

Top of a white rectangle with blurred shadow

shadows.blur can not change color, but you can manually add a shadow like this:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\pagestyle{empty}
\pagecolor{blue!20}
\begin{tikzpicture}[remember picture, overlay]
\foreach \x in {0,0.025,...,1}
 \draw[blue!50, opacity=\x, thick] ([xshift=-23mm+10-10*\x, yshift=-23mm]current page.north east) -- ([xshift=-23mm+10-10*\x, yshift=-227mm]current page.north east);
\fill[white] ([xshift=23mm, yshift=-23mm]current page.north west)rectangle([xshift=-23mm, yshift=-227mm]current page.north east);
\end{tikzpicture}
\end{document}

Top of a white rectangle with blurred blue shadow

  • Is it possible to change the colour of shadow to blue anyway? – Vishakha Feb 23 '24 at 16:30
  • What do you mean by "anyway". A blue shadow on a blue background would not be visible. Do you want the shadow less dark? – hpekristiansen Feb 23 '24 at 17:16
  • Yees, actually I want the shadow less dark. I was referring the above image that I have attached and it has blue shadow which is less dark. And I also want to use the similar effect for my code. – Vishakha Feb 23 '24 at 17:46
  • Thanks for your answer! – Vishakha Feb 25 '24 at 16:38
  • @Vishakha: No need to write thank you on this site. It might sound strange, but it is actually discouraged to prevent clutter. Just upvote and accept answer. – hpekristiansen Feb 25 '24 at 16:59