Hello, Another problem with PGF+ConTeXt is the handling of cmyk colors:
\usemodule[tikz] \setupcolors[state=start] \definecolor[my_yellow][c=0,m=0.3,y=0.94,k=0] \starttext \startcolor[my_yellow] Yellow text. \stopcolor \starttikzpicture \fill[my_yellow] (0,0) circle(1); \stoptikzpicture \stoptext CMYK colors work in ConTeXt but do not get passed correctly to PGF/TikZ. A work-around is to transform to rgb : \definecolor[my_yellow][r=0.98,g=0.698,b=0.09] % 250,178,23 #FAB217 This seems to be a documented bug; Perhaps it will be fixed someday... Alan On Tuesday 19 February 2008 04:47:35 Aditya Mahajan wrote: > On Mon, 18 Feb 2008, Jesse Alama wrote: > > Hi Aditya, > > > > Thanks for the help -- I think I now see why there is such trouble with > > colors in pgf and context. It looks like one can systematically > > transform LaTeX-like PGF examples of \color into ConTeXt examples. > > > > The reason why this came up is that I'm trying to go through Till > > Tantau's "Example for Karl's Students" tutorial in the PGF/TikZ manual. > > Has anyone managed to ConTeXt-ify that example? > > I did that some time back while testing tikz. I will send that file as a > reply to this email, since I am not sure if it will go through the mailing > list because of its size. > > > The example features some \definecolor's which I just did away with > > (sadly) by simply substituting their defining values for their > > occurences. (This is unfortunate, but perhaps necessary until some > > other mechanism is produced.) The problem is that the text box to the > > right of the picture is supposed to be colored, and with rounded > > corners. But the box is missing. Look at p. 20 of > > The TikZ manual make a lot of uses of the xcolor syntax (e.g. > \color{red!20}). There is no equivalent ConTeXt syntax. You need to define > a color, say lightred, as follows > > \definecolor[lightred][r=0.2] > > For tikz key-value options, pgf works behind the scene to define > appropriate colors, so xcolor syntax works for them. So > \fill[fillcolor=red!20] will work as expected. However, when using \color > inside any box, you need to follow ConTeXt syntax. So \color[red!20] will > not work, you need to define a context color and then use that. > > Hope that this clarifies some things. > > Aditya > ___________________________________________________________________________ >________ If your question is of interest to others as well, please add an > entry to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context webpage : > http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________ >________ -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:[EMAIL PROTECTED] http://www-dna2006.cea.fr/ .''`. : :' : `. `'` `- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________