[XeTeX] Color names in XeTeX
Jonathan Kew
jonathan_kew at sil.org
Mon Dec 27 23:28:02 CET 2004
On 27 Dec 2004, at 10:01 pm, Bruno Voisin wrote:
> Le 27 déc. 04, à 19:08, Jonathan Kew a écrit :
>>
>> \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...
>
> Is \special{color cmyk 1.0 0.0 0.0 0.5} an indication that:
>
> - A simplified XeTeX color \special syntax is available?
>
> - CMYK color specification work in XeTeX?
>
> So far I thought, according to XeTeX-notes.tex, that only RGB 6-digit
> hex values were allowed, in the form:
>
> \special{x:textcolorpush}
> \special{x:textcolor=4444CC}
> Some text
> \special{x:textcolorpop}
The "original" XeTeX \specials all use an "x:" prefix, and yes, the
x:textcolor \special expects 6-digit hex RGB values. (Or 8-digit hex
RGBA values, if you want transparency.)
However, XeTeX now also supports dvipdfm-style "color" \specials as
well, or at least some forms of them; you can use, I think:
color push
color pop
color <colorspace> <values>
where
<colorspace> is one of gray/rgb/hsb/hsv/hls/cmyk
and
<values> is a space-separated series (one, three, or four, depending
on <colorspace>) of decimal values in the 0.0 .. 1.0 range.
This was added at the same time as the (limited) hyperref support,
being also based on the \special support in dvipdfm. (From your
example, it looks like dvips may use the same \special syntax for
colors, too.) There's a one-line mention of the feature in the notes
from release 0.87, for those who were paying close attention at that
particular moment!
HTH. Don't you wish XeTeX had some real documentation? ;-)
JK
More information about the XeTeX
mailing list