[OS X TeX] the color of color

Piet van Oostrum piet at cs.uu.nl
Thu Dec 29 14:05:50 EST 2005

>>>>> Robert Spence <spence at saar.de> (RS) wrote:

>RS> On 27.12.2005, at 10:50, Piet van Oostrum wrote:

>>> That's because you are not using dvips, but pdflatex, which  doesn't
>RS>    know
>>> these names by default. Just add also the option dvipsnames to  make
>RS>    these known:
>>> \usepackage[usenames,dvipsnames]{color}

>RS> Hmmm... Now _I'm_ the one who's confused!  Let me see if I can  understand:

>RS> 1) You no longer need to specify the driver options explicitly in the
>RS>    preamble because Gerben Wierda's teTeX distribution is clever enough  to
>RS>    work out for itself whether you're processing with pdflatex or  with
>RS>    latex plus Ghostscript.

That's right. The graphics/x and color packages automatically switch
between dvips and pdftex if you don't specify an option. 
I never specify the [dvips] or [pdftex] option for these packages. There
are some packages that still need it (I think geometry at least).

>RS> 2) These days the default is to process with pdflatex, which means  the
>RS>    [pdftex] driver option for the color package somehow gets  specified
>RS>    implicitly.

See 1.

>RS> 3) LaTeX would know the names and definitions of those 68 Postscript
>RS>    colors if
>RS>   a) you were using the [dvips] driver option and
>RS>   b) decided to use the [named] color model by explicitly specifying  it
>RS>   ("declaring" it?) as an
>RS>    option to your \textcolor or \colorbox command (or whatever) when  you
>RS>    typed it.

If you mean a) AND b): yes.

>RS> 4) The purpose of the [dvipsnames] option is to make those 68 coior
>RS>    definitions available to _other drivers than dvips_ when using the
>RS>    [named] color model, the color model that has the advantage of being
>RS>    easier to achieve output-device-independence with.

Yes. without [dvipsnames] the 68 color names are handled inside dvips. You
TeX does not define them.
The [dvipsnames] option, however, defines these names as CMYK colors in

>RS> 5) The purpose of the [usenames] option is to make those 68 color
>RS>    definitions available _outside the [named] color model_, so that you
>RS>    can have the convenience of just typing, e.g.,
>RS> \colorbox{Orange}{the background here is Orange} rather than having  to
>RS> specify a color model.

Not exactly: it has nothing to do with those 68 colors. The [usenames]
option causes the [named] color model to be chosen if the color is unknown
and no color model is specified.

>RS> 6) If you include both options in the preamble by writing \usepackage
>RS>    [usenames,dvipsnames]{color} you should be able to
>RS> a) successfully type
>RS>     \colorbox{Orange}{the background here is Orange}
>RS>     and get the desired result even if you're processing with pdftex
>RS>     instead of tex plus Ghostscript.
>RS> b) successfully type
>RS>     \colorbox{green}{the background here is the pure "green" I'm used  to}
>RS> c) successfully type
>RS>    \colorbox{Green}{I don't like this darker color called "Green"}
>RS> d) successfully type
>RS>    \colorbox[named]{Green}{...}
>RS> d) get an error message if you try to type
>RS>    \colorbox[named]{green}{...}

Correct: `green' isn't a [named] color, it is one of the colors defined by
default (as rgb color). 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list