Changes

Jump to navigation Jump to search
1,671 bytes added ,  21:50, 24 November 2004
no edit summary
< [[Visuals]] | [[Graphics]] >

Using colors with ConTeXt is easy:
* Start with <cmd>setupcolors</cmd><tt>[state=start]</tt>. Without that, everything appears in greys.
* If you want only RGB or only CMYK color, use <tt>cmyk=no</tt> or <tt>rgb=no</tt>. 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 <tt>colo-xxx.tex</tt>, load them with <cmd>setupcolor</cmd><tt>[xxx]</tt>:
** 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 <cmd>showcolor</cmd><tt>[xxx]</tt>!
* Define your own colors with <cmd>definecolor</cmd><tt>[blablue][r=.1, g=.1, b=1, c=1, m=.1, y=0, k=0, s=.2]</tt> (definition for RGB, CMYK and Grey!)
* Use the color name like <tt>[color=blablue]</tt> in some <tt>\setup...</tt> command.
* Typeset single text elements with <cmd>color</cmd><tt>[blablue]{nice blue text}</tt> or longer sections with <cmd>startcolor</cmd><tt>[blablue] ...</tt> <cmd>stopcolor</cmd>.

(See also "Color and Background" in the manual!)

===Sample===
<texcode>
\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!
</texcode>
<context>
\setupcolors[state=start]
\definecolor[blablue][r=.1, g=.1, b=1, c=1, m=.1, y=0, k=0, s=.2]

Here's some \color[blablue]{blue text} inbetween!
</context>

==Colorgroups (Palettes)==
Very interesting feature, to be described later...

Navigation menu