ma-cb-en-color.tex /size: 1461 b    last modification: 2020-07-01 14:35
1\startcomponent ma-cb-en-color
2
3\project ma-cb
4
5\startchapter[title=Color]
6
7\index{color}
8
9\Command{\tex{setupcolors}}
10\Command{\tex{color}}
11\Command{\tex{definecolor}}
12
13Text, frames or backgrounds can be set in color with:
14
15\shortsetup{color}
16
17Default the basic colors are available. Basic colors are for example
18red, white and blue. A color like orange can be defined with:
19
20\shortsetup{definecolor}
21
22You can define orange like this:
23
24\startbuffer[a]
25\definecolor [darkorange]   [c=0.0,m=0.60,y=1.00,k=0.0]
26\definecolor [middleorange] [.5(darkorange)]
27\stopbuffer
28
29\typebuffer[a]
30
31\getbuffer[a]
32
33It is of good practice to check (combinations of) colors on a larger
34surface:
35
36\startbuffer
37\blackrule[width=\hsize,height=1cm,color=red,after=]
38\blackrule[width=\hsize,height=1cm,color=white,after=]
39\blackrule[width=\hsize,height=1cm,color=blue,after=]
40\blackrule[width=\hsize,height=1cm,color=darkorange]
41\stopbuffer
42
43\typebuffer
44
45so you can see if they fit together:
46
47\blank
48
49\getbuffer
50
51A color can be invoked in a number of ways:
52
53\startbuffer
54\startcolor[red]
55On {\darkorange Kingsday} {\blue Hasselt} turns into a
56\color[darkorange]{colorfull} city.
57\stopcolor
58\stopbuffer
59
60\typebuffer
61
62\getbuffer
63
64More information on the use of color models, transparency and palets can be found
65on the \goto {\CONTEXTWIKI} [ url (http://wiki.contextgarden.net/Color) ]
66and in the
67\goto {\em Color Separation} [ url (manual:color) ] manual.
68
69\stopchapter
70
71\stopcomponent
72