# Transparent package alters tikz color opacity [duplicate]

When using the package transparent for some elements in text, it has a huge side effect: it alters the colors also in any TikZ image of the document.

This is the result without using the package:

\documentclass[border=1cm]{standalone}
%\usepackage{transparent}
\usepackage{tikz}

\begin{document}

Some transparent text.

\begin{tikzpicture}

\draw[fill=yellow,opacity=0.2] (0,0) -- (0,2) -- (2,2) -- (2,0) -- cycle;

\end{tikzpicture}

\end{document}


And this is the result using the package:

\documentclass[border=1cm]{standalone}
\usepackage{transparent}
\usepackage{tikz}

\begin{document}

Some \texttransparent{0.5}{transparent} text.

\begin{tikzpicture}

\draw[fill=yellow,opacity=0.2] (0,0) -- (0,2) -- (2,2) -- (2,0) -- cycle;

\end{tikzpicture}

\end{document}


The correct color for the square is the fist one; the correct transparency for the text is the second one. How to avoid this, having both features at the same time? (Not necessarily using transparent).

This error generates using TeXstudio 2.10.8 (hg 5802:5ee1d048e556), Qt Version 5.5.1, in Ubuntu 16.04 (all packages are up-to-date), with pdflatex -synctex=1 -interaction=nonstopmode %.tex. Here is the logfile.

## marked as duplicate by Stefan Pinnow, TeXnician, Community♦Dec 6 '18 at 19:01

• @book I can reproduce this result using pdftex with MikTeX's latest distribution. – Raaja Dec 6 '18 at 11:56