[metapost] Problem with colors

Steve Checkoway s at pahtak.org
Sun Aug 8 15:40:19 CEST 2010


On Aug 8, 2010, at 06:19 , Troy Henderson wrote:

> Replace
> 
> label(btex \color{red}X etex, origin);
> 
> with
> 
> label(btex X etex, origin) withcolor red;
> 
> or
> 
> label(btex X etex, origin) withcmykcolor (1,0,0,0); % This gives cyan
> 
> There appears to be no built-in synonyms (although you could easily write your own) for the base cmykcolors cyan, magenta, and yellow.  Black is already synonymous with the RGB (0,0,0).  Specifically, you could do
> 
> cmykcolor cyan,magenta,yellow;
> cyan:=(1,0,0,0);
> magenta:=(0,1,0,0);
> yellow:=(0,0,1,0);
> 
> label(btex X etex,origin) withcmykcolor cyan;

That all appears to work. It seems that withcolor (0,0,1,0) works as well. (I guess it treats quadruples as cmyk and triples as rgb.) Given that, adding the definition
def cmyk = enddef;
appears to make my original example work.


-- 
Steve Checkoway







More information about the metapost mailing list