[XeTeX] Color names in XeTeX
Bruno Voisin
bvoisin at mac.com
Mon Dec 27 23:01:10 CET 2004
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}
I'm asking this because I've been thinking to update my departmental
letterhead macro file, such that it can be used with XeTeX. There's a
LaTeX version and a plain TeX version as well (which I'm probably the
only person to use). In it I need to write some footer in the two
shades of blue of my departmental logo, which are CMYK colors. So far
here's what I've been doing
\def\darkblue#1{\Color{1. .43 0. .18}{#1}}
\def\lightblue#1{\Color{1. .09 0. 0.}{#1}}
% For pdfTeX
\ifpdf
\input pdfcolor
\def\Color##1##2{\pdfsetcolor{##1}##2\pdfsetcolor{\maincolor}}
\else
% For XeTeX
\ifxetex
\def\Color##1##2{##2} % for lack of knowing better
\else
% For Textures
\iftextures
\def\Color##1##2{\special{color push}\special{color cmyk ##1}##2%
\special{color pop}}
\else
% For dvips
\def\Color##1##2{\special{color push cmyk ##1}##2\special{color
pop}}
\fi
\fi
\fi
I was planning to look at some point at Ross' xetex.def, to see how
color switches are defined, but had not found the time so far.
Bruno Voisin
More information about the XeTeX
mailing list