Colors change when Sketch output is included

35 views
Skip to first unread message

David Etlinger

unread,
May 16, 2009, 4:05:57 AM5/16/09
to Sketch Users
Hello again,

I have found that including a Sketch-produced TikZ picture will change
the color of other TikZ pictures in the document. A pure blue color
turns into a much darker blue. I haven't dug into this but I wonder if
anyone knows offhand? My Sketch pictures use transparency, if that
could make a difference.

Thanks for any help!

Kjell Magne Fauske

unread,
May 16, 2009, 1:53:22 PM5/16/09
to sketch...@googlegroups.com

Hi,

This is unfortunately a well known issue with Acrobat reader and PDFs
with transparency generated using TikZ and PGF. If I remember
correctly, the same thing will happen if you transparency and
Pstricks. The author of TikZ and PGF claims this is an Acrobat bug and
the effect does not appear when using other PDF viewers.

There are a few workarounds:

- Try inserting this at the start of your document:

\ifpdf\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}\fi

It may have some side effects, but I have not noticed any.

- If you have Acrobat Professional you can flatten the document

- Try another PDF viewer.

What version of Acrobat are you using? I'm not 100 percent sure about
this, but I have not noticed the effect when using acrobat 8.

Hope this helps.

Regards,
Kjell Magne Fauske

FollowTheMusic

unread,
Jun 29, 2009, 3:47:53 PM6/29/09
to Sketch Users
Hi,

A very belated report on this, in case anyone else finds it helpful:

On May 16, 10:53 am, Kjell Magne Fauske <kjel...@gmail.com> wrote:
> On Sat, May 16, 2009 at 10:05 AM, David Etlinger
>
> <etlin...@northwestern.edu> wrote:
>
> > Hello again,
>
> > I have found that including a Sketch-produced TikZ picture will change
> > the color of other TikZ pictures in the document. A pure blue color
> > turns into a much darker blue. I haven't dug into this but I wonder if
> > anyone knows offhand? My Sketch pictures use transparency, if that
> > could make a difference.
>
> > Thanks for any help!
>
> Hi,
>
> This is unfortunately a well known issue with Acrobat reader and PDFs
> with transparency generated using TikZ and PGF. If I remember
> correctly, the same thing will happen if you transparency and
> Pstricks. The author of TikZ and PGF claims this is an Acrobat bug and
> the effect does not appear when using other PDF viewers.
>
> There are a few workarounds:
>
> - Try inserting this at the start of your document:
>
> \ifpdf\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}\fi
>
> It may have some side effects, but I have not noticed any.

This was the best solution. It appears that transparency invokes a
change from RGB color to CMYK. This line forces it back. This was the
clearest explanation I found:

http://www.nabble.com/Re:--Latex-beamer-users--beamer-color-issues-td15389091.html

The problem is this will overwrite any earlier pdfpageattr settings of
other packages. However pdfpageattr appears rarely used; I was unable
to find any list of where it does occur. I used many other packages
and noticed no side effects.

(Kjell I'm sure you knew this stuff already).

One other thing I found; if the graphic is externalized via PGF
\beginpgfgraphicnamed mechanism, the problem is confined to a single
page. Maybe this is useful to someone but I still found it
unacceptable.

Also just to mention it, besides color issues it seems to disrupt
proper antialiasing of text. Or maybe it's still a color-model issue,
but that's how it appears visually.

> - If you have Acrobat Professional you can flatten the document

I'm no graphic designer, and the PDF spec is impenetrable to me. It
seems there is no simple "flatten transparency but leave everything
else alone" option; you have to wade through many graphics settings
and know their (poorly documented) effect. Anyway, that's how it
seemed to me!

> - Try another PDF viewer.

No problems in Gsview but I can't control what my readers use.

> What version of Acrobat are you using? I'm not 100 percent sure about
> this, but I have not noticed the effect when using acrobat 8.

Reader 9 on Windows XP; Acrobat Pro on Mac OS 10.5 (with latest
patches on both).

> Hope this helps.

It did! Thanks!

> Regards,
> Kjell Magne Fauske

Kjell Magne Fauske

unread,
Jun 29, 2009, 4:11:27 PM6/29/09
to sketch...@googlegroups.com
Thanks for confirming this. I have had no problems with the "hack"
either so it seems to be a relatively safe thing to do.

> Also just to mention it, besides color issues it seems to disrupt
> proper antialiasing of text. Or maybe it's still a color-model issue,
> but that's how it appears visually.
>

I have noticed this too.

>> - If you have Acrobat Professional you can flatten the document
>
> I'm no graphic designer, and the PDF spec is impenetrable to me. It
> seems there is no simple "flatten transparency but leave everything
> else alone" option; you have to wade through many graphics settings
> and know their (poorly documented) effect. Anyway, that's how it
> seemed to me!
>

In Acrobat 7 there is an 'Transparency flattening' option in the
Tools>Print production menu. In newer versions I believe it is hidden
in the PDF-optimizer tool. I used the pdf optimizer recently to
flatten a document and discovered too late that it also deleted all of
my ligatures, so using the default settings is not always a good idea
:)


- Kjell Magne
Reply all
Reply to author
Forward
0 new messages