# How can I draw a semi-transparent arrow in TikZ without internal overlap?

Drawing a semi-transparent arrow should be easy enough, right?

\documentclass{article}

\usepackage{tikz}
%\usetikzlibrary{arrows} % this doesn't change the result

\pagenumbering{gobble}

\begin{document}

\begin{tikzpicture}
\draw[-stealth,line width=12pt,opacity=0.5] (0, 0) -- (0, 2);
\end{tikzpicture}

\end{document}


However, this produces the following result:

Note that the arrow is darker than it should be where the rectangle and arrowhead overlap.

How can I get an arrow of this shape and size without this artifact? (Clean solutions preferred.)

• It's a lot easier to stick an arrowhead on the end of a line than combine the two into a single shape. Hmmm, create an outline then fill it? – John Kormylo Feb 11 '15 at 20:49
• This is what the transparency group feature is for: wrap your arrow in \begin{scope}[transparency group, opacity=0.5] ... \end{scope} – Jake Feb 11 '15 at 21:16
• @jake - And after all the work I just did creating a new arrowhead! – John Kormylo Feb 11 '15 at 22:29
• @Jake An answer? – cfr Feb 11 '15 at 23:11
• – Ignasi Feb 18 '15 at 17:38

## 1 Answer

This is what the transparency group feature is for: wrap your arrow in \begin{scope}[transparency group, opacity=0.5] ... \end{scope}:

\documentclass{article}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\draw [line width=10pt, cyan] (-1,0) -- (1,2);
\begin{scope}[transparency group, opacity=0.75]
\draw[-stealth,line width=12pt, red] (0, 0) -- (0, 2);
\end{scope}
\end{tikzpicture}

\end{document}

• Perfect—thanks very much! For reference, this is on pp. 240–241 of texdoc tikz, v2.10. – wchargin Feb 12 '15 at 17:35