[OS X TeX] the color of color
Robert Spence
spence at saar.de
Mon Dec 26 20:49:04 EST 2005
I think the problem is (probably) that with "green" you're getting
the standard green that's predefined in David Carlisle's color.sty as
\definecolor{green}{rgb}{0,1,0}
i.e. it's what you get even if you have an optionless
\usepackage{color}
in the preamble and then just write
\textcolor{green}{this is green}
in the body of the document without specifying a colour model option
in the \textcolor command (or the \colorbox command, or whatever).
You can always get black, white, red, green, blue, cyan, magenta and
yellow that way, regardless of what colour model you're using, as all
those names are predefined, so in fact you only need to add [named]
to the \colorbox command if you want to get one of the 68 extra
colours available that way, like JungleGreen, or Green, or ...
You can use
\colorbox[named]{Orange}{this is the Orange I want}
and
\colorbox{green}{this is the nice green I'm used to}
in the same document.
There's a good description in section 3 of the document called
grfguide.pdf (Packages in the graphics bundle, by D.P. Carlisle).
You can also define any colours you want, at any point in your
document, using the
\definecolor{<name>}{<model>}{<color specification>}
command.
D.P. Story (Akron, Ohio) suggests the following green for
highlighting text on the web:
\definecolor{webgreen}{rgb}{0,.6,0}
i.e. a darker shade, to show up better against a white background,
whereas what you need is a precisely the opposite, namely a lighter
green background
( {0,1,0} in TeX's decimal notation for the rgb model) that black
text will stand out better against.
If you're used to thinking in terms of the "safe" colours for web
browsers as defined in hexadecimal notation the way they are in HTML,
you can create a file called something like colordef.tex to contain
(some subset of) definitions like
\definecolor{rgb000000}{rgb}{0,0,0}
\definecolor{rgb000033}{rgb}{0,0,.2}
\definecolor{rgb000066}{rgb}{0,0,.4}
\definecolor{rgb000099}{rgb}{0,0,.6}
\definecolor{rgb0000cc}{rgb}{0,0,.8}
\definecolor{rgb0000ff}{rgb}{0,0,1}
....
\definecolor{rgbffff00}{rgb}{1,1,0}
\definecolor{rgbffff33}{rgb}{1,1,.2}
\definecolor{rgbffff66}{rgb}{1,1,.4}
\definecolor{rgbffff99}{rgb}{1,1,.6}
\definecolor{rgbffffcc}{rgb}{1,1,.8}
\definecolor{rgbffffff}{rgb}{1,1,1}
--- where the size of the subset will depend on how worried you are
about running out of TeX memory ;-)
P.S.:
I just saw that Peter Dyballa suggested xcolor, which is quite
awesome; even more awesome (and by the same author, Dr. Uwe Kern) is
the reference manual chroma.pdf, available at
http://www.ukern.de/tex/chroma.html
------------------------- 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