Changes

Jump to navigation Jump to search
256 bytes added ,  13:17, 1 June 2009
→‎Using Colors: Added subsections
Using colors with ConTeXt is easy:
 
== Choosing a color model ==
* RGB and CMYK are enabled by default. If you want only RGB or only CMYK color, use <tt>cmyk=no</tt> or <tt>rgb=no</tt>. Multitone colors see below.
* For spot colors, say spot=yes. To eliminate everything except spot colours, leaving a clean file for professional printing, accompany this with rgb=no,cmyk=no. See spot colours below for more details.
* Normally all colors are defined in RGB ''and'' CMYK and get converted if needed.
* == Using predefined colors: <cmd>setupcolor</cmd> == 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 {| ! width="25%"| ! width="10%"| ! width="65%"| |- | <texcode>\showcolor[rgb]</texcode>|| <context>\setupcolors[state=start]\showcolor[rgb]</context>|} == Defining colors with : <cmd>definecolor</cmd> == <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!)
* You can define '''transparent''' colors through setting t, e.g. <tt>t=0.5</tt>. Beware, most PDF viewers and printshops can't handle PDF transparences!
* Use the color name like <tt>[color=blablue]</tt> in some <tt>\setup...</tt> command.
(See also "Color and Background" in the manual!)
{| ! width="45%"| ! width="10%"| ! width=Sample==="45%"| |- | <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!
 
\showcolor[rgb]
</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!
 
\showcolor[rgb]
</context>
|}
=Colorgroups and Palettes=

Navigation menu