# TikZ: How can I remove the undesired border of a polygon with color gradient?

folks!

I want to draw a polygon with TikZ that has a color gradient from white to gray. Unfortunately, the polygon has a small gray border and I don't know why and how to remove it. This is my MWE:

\documentclass[tikz, border=10pt]{standalone}
\begin{document}

\tikz{\path[fill, left color=white, right color=black!10] (0, 0) -- (1, 1) -- (1, 3) -- (0, 4) -- cycle;}

\end{document}


This is the result:

You can see the border which seems to be in the color black!10 (notably the left, top and bottom border). If I set the color of the border explicitly to white (draw=white) it looks fine but only on white background (of course). In my image, the left part of the polygon is on a white background the right part of a gray (black!10) background. Thus, a white border is not the solution that works for me.

So, the question is: How can I remove the border? (And: What is the reason that the border even exists?) Or, in case it is not possible: How can I set the left border to white and the right border to black!10?

What you see is not a "real" border but rather a filled area, that is additionally shaded. Replace fill by shade to only shade it.
• That's it! Easy like that! It even works if I remove fill at all. – Cornelius Mar 17 '18 at 12:50