Changes

Jump to navigation Jump to search
32 bytes removed ,  15:48, 19 May 2012
Correct command links. Shrink a few examples.
In older versions, colors must be enabled using
< {{cmd>|setupcolors</cmd>}}<tt>[state=start]</tt>
=Defining Colors=
* 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
* ema: Emacs colors
* Try the magic <{{cmd>|showcolor</cmd>}}<tt>[xxx]</tt>!For example, {| ! width<context source="25%yes"| ! width="10%"| ! widthtext="65%yields this:"| |- | <texcode>\showcolor[rgb]</texcode>|| <context>
\setupcolors[state=start]
\showcolor[rgb]
</context>
|}
== Defining colors: <{{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!).
See also [[Command/definecolor]].
|}
== Defining color schemes: <{{cmd>|definecolorgroup</cmd> }} and <{{cmd>|definepalet</cmd>}}==<{{cmd>|definecolorgroup</cmd>}}<tt>[name][system][values]</tt>
<{{cmd>|definepalet</cmd>}}<tt>[palettename][colorname1=groupcolor:1, colorname2=groupcolor:2, ...]</tt>
Very interesting feature, see also the manual and here on the wiki [[Command/definecolor]]
== With text ==
Typeset single text elements with <{{cmd>|color</cmd>}}<tt>[colorname]{nice blue text}</tt>:
{|
|}
Alternatively, typeset text elements with <{{cmd>|colored</cmd>}}<tt>[rgb values]{colored text}</tt> (suggested on NTG-ConTeXt: [http://www.ntg.nl/pipermail/ntg-context/2010/046563.html]):
{|
Typeset longer sections with <{{cmd>|startcolor</cmd>}}<tt>[colorname] ...</tt> <{{cmd>|stopcolor</cmd>}}:
{|
|-
| <texcode>
\setuppapersize[A6]
\starttext
\startcolor[orange]
|
|<context>
\setuppapersize[A6]
\setupcolors[state=start]
\starttext
|-
| <texcode>
\setuppapersize[A10]
\setupbackgrounds[page][background=color,backgroundcolor=blue]
|
|<context>
\setuppapersize[A10]
\setupcolors[state=start]
To produce a file ready for a clean PDF separation process at your print house, start with:
<{{cmd>|setupcolors</cmd>}}<tt>[rgb=no,cmyk=yes,spot=yes,state=start,overprint=yes]</tt>
which will set things up for spot colors with CMYK allowed. The last setting ensures that black overprinting your spot colour tints will not knock out the colour - this is important for some types of commercial printing.
Then define your basic spot colour. Note that the name cannot contain spaces or numbers (but we come to that later):
<{{cmd>|definecolor</cmd>}}<tt>[PantoneTwoNineFour][c=1,m=.56,y=0,k=.18]</tt>
Now you can define the tints of this ink that you are actually going to use in your document. Let's say you'll have a 100% for headings:
<{{cmd>|definespotcolor</cmd>}}<tt>[MyBlue][PantoneTwoNineFour][p=1]</tt>
And then a 20% tint for nice display boxes:
<{{cmd>|definespotcolor</cmd>}}<tt>[MyBlueTint][PantoneTwoNineFour][p=.2]</tt>
And now you can happily use these named colours:
to be true across the board now?)
Any text between a <{{cmd>|startcolor[DarkBlue]</cmd> }} and <{{cmd>|stopcolor</cmd> }} should now be assigned to the correct spot colour channel - Pantone 308 CV - on output. More importantly if you include an external figure containing areas of this colour then your text and those parts of the graphic which have the same colour should now appear together in the 'Pantone 308 CV' colour channel on colour separation.
For example, if your original graphic is an EPS file containing the following lines:

Navigation menu