Difference between revisions of "Color"
Jump to navigation
Jump to search
m (added hints to colorgroups, minor changes) |
|||
Line 1: | Line 1: | ||
− | < [[Visuals]] | [[Graphics]] > | + | < [[Visuals]] | [[Transparency]] | [[Graphics]] > |
+ | |||
+ | ==Using Colors=== | ||
Using colors with ConTeXt is easy: | Using colors with ConTeXt is easy: | ||
* Start with <cmd>setupcolors</cmd><tt>[state=start]</tt>. Without that, everything appears in greys. | * 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. | * 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 | + | * 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>: | * 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!) | ** rgb: some simple colors, loaded by default (with translations for the different interface languages!) | ||
Line 23: | Line 25: | ||
Here's some \color[blablue]{blue text} inbetween! | Here's some \color[blablue]{blue text} inbetween! | ||
+ | |||
+ | \showcolor[pra] | ||
</texcode> | </texcode> | ||
<context> | <context> | ||
Line 29: | Line 33: | ||
Here's some \color[blablue]{blue text} inbetween! | Here's some \color[blablue]{blue text} inbetween! | ||
+ | |||
+ | \showcolor[pra] | ||
</context> | </context> | ||
− | ==Colorgroups | + | ==Colorgroups and Palettes== |
− | Very interesting feature, to be described later... | + | <cmd>definecolorgroup</cmd><tt>[name][system][values]</tt> |
+ | |||
+ | <cmd>definepalet</cmd><tt>[palettename][colorname1=groupcolor:1, colorname2=groupcolor:2, ...]</tt> | ||
+ | |||
+ | Very interesting feature, to be described later... (see manual) |
Revision as of 17:04, 25 November 2004
< 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[pra]
Colorgroups and Palettes
\definecolorgroup[name][system][values]
\definepalet[palettename][colorname1=groupcolor:1, colorname2=groupcolor:2, ...]
Very interesting feature, to be described later... (see manual)