[XeTeX] Color names in XeTeX

Jonathan Kew jonathan_kew at sil.org
Mon Dec 27 19:08:44 CET 2004

On 27 Dec 2004, at 2:58 pm, Stephen Moye wrote:

> Is there a way to create a named color using XeTeX? I'd like to create 
> a name such as PMS810U and then specify the cmyk|rgb specification and 
> thereafter obtain the color solely using the name. Tints would be 
> nice, for example specifying PMS810U at 60%.

Not really, but for a simple version you could define macros for the 
color values you want, and then use these within the color \special. 

	\def\myredcolor{rgb 0.8 0.0 0.0}
	\def\mydarkcyancolor{cmyk 1.0 0.0 0.0 0.5}

	Some text... \special{color \myredcolor} ...red text...
	\special{color \mydarkcyancolor} ...cyan text...

I suppose you could even have a macro that accepts a tint parameter and 
calculates appropriate rgb or cmyk values.... left as an exercise for 
the reader.... :)


More information about the XeTeX mailing list