Changes

Jump to navigation Jump to search
2,704 bytes removed ,  20:47, 15 June 2015
m
Material included in the new page
* 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}} ==
 
Colors have identifiers, some of which are grouped in more or less
widely known sets. The primary example of these possibly are the
[http://www.w3.org/TR/2002/WD-css3-color-20020219/#x11-color named colors of the X Windowing System],
a set of RGB vectors.
With the growth of the WWW this list of definitions eventually achieved
the rank of the default ''Web colors''.
For convenience the X11 colors, along with a couple others, are
pre-defined in Context in the form of a loadable module.
 
''NB'': there are two sets representing the web colors:
<code>xwi</code> and <code>x11</code>. The main difference between them
is that the latter defines variations for many keywords.
For instance, instead of having only one color ''deepskyblue'' with
<code>xwi</code>, you get another four colors ''deepskyblue1'',
''deepskyblue2'' ''deepskyblue3'' and ''deepskyblue4'' with the
<code>x11</code> set.
(Another technical aspect is that the latter are specified using
hexadecimal RGB values whereas the former rely on decimal values.)
 
To use them and any of the others listed below, pass the respective
definition identifier to {{cmd|setupcolor}}:
 
<texcode>
\setupcolor[x11]
</texcode>
 
The macro {{cmd|showcolor}} pretty prints a the list of all named
colors in a definition set.
 
<context mode="mkiv" source="yes" text="yields several pages of this:">
\showcolor[rgb]
</context>
 
=== MkIV ===
 
The definitions reside in the files prefixed <code>colo-imp-</code>, to
separate them from the color functionality that is implemented in
<code>colo-xxx.mkiv</code>.
 
{|
! id !! source !! description
|-
| rgb || {{src|colo-imp-rgb.mkiv}} || some simple colors, loaded by default (with translations for the different interface languages!)
|-
| xwi || {{src|colo-imp-xwi.mkiv}}
| Xorg color keywords (WWW), defined in decimal RGB
|-
| x11 || {{src|colo-imp-x11.mkiv}}
| extended Xorg color keywords (WWW), defined in hex RGB
|-
| ema || {{src|colo-imp-ema.mkiv}} || Emacs colors
|-
| dem || {{src|colo-imp-dem.mkiv}}
| color groups and palets for different language interfaces
|}
 
=== MkII ===
 
You will find lists of predefined colors in the files
<tt>colo-xxx.mkii</tt>, load them with
{{cmd|setupcolor}}<tt>[xxx]</tt>.
{|
! id !! source !! description
|-
| rgb || {{src|colo-rgb.mkii}} || some simple colors, loaded by default (with translations for the different interface languages!)
|-
| x11 || {{src|colo-x11.mkii}} || Xorg-colors (hex)
|-
| xwi || {{src|colo-xwi.mkii}} || Xorg-colors (decimal)
|-
| pra || {{src|colo-???.mkii|link=no}}
| PRAGMA ADE corporate design (not included in the distribution?)
|-
| ema || {{src|colo-ema.mkii}} || Emacs colors
|}
=== Alternatives ===

Navigation menu