< Visuals | Transparency | Graphics >
Using Colors
Using colors with ConTeXt is easy:
- Start with \setupcolors[state=start]. Without that, everything appears in greys.
- If you want only RGB or only CMYK color, use cmyk=no or rgb=no. It seems there are also spot and hexachrome colors possible, but I don't know yet how.
- Normally all colors are defined in RGB and CMYK and get converted if needed.
- You find lists of predefined colors in the files colo-xxx.tex, load them with \setupcolor[xxx]:
- rgb: some simple colors, loaded by default (with translations for the different interface languages!)
- xwi: X-Windows-colors
- pra: PRAGMA ADE company colors
- ema: Emacs colors
- Try the magic \showcolor[xxx]!
- Define your own colors with \definecolor[blablue][r=.1, g=.1, b=1, c=1, m=.1, y=0, k=0, s=.2] (definition for RGB, CMYK and Grey!)
- Use the color name like [color=blablue] in some \setup... command.
- Typeset single text elements with \color[blablue]{nice blue text} or longer sections with \startcolor[blablue] ... \stopcolor.
(See also "Color and Background" in the manual!)
Sample
\setupcolors[state=start] \definecolor[blablue][r=.25, g=.1, b=1, c=1, m=.1, y=0, k=0, s=.2] Here's some \color[blablue]{blue text} inbetween! \showcolor[rgb]
Colorgroups and Palettes
\definecolorgroup[name][system][values]
\definepalet[palettename][colorname1=groupcolor:1, colorname2=groupcolor:2, ...]
Very interesting feature, to be described later... (see manual)