colo-imp-rgb.mkiv /size: 11 Kb    last modification: 2020-07-01 14:35
1%D \module
2%D   [       file=colo-rgb,
3%D        version=1995.01.01,
4%D          title=\CONTEXT\ Color Macros,
5%D       subtitle=RGB,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14%D Just to give users a start we define some colors. While
15%D switching fonts is as international as can be, thanks to the
16%D mnemonics, naming colors is very interface dependant. To
17%D support international setups, we define both english and
18%D interface dependant colors. We use the color inheritance
19%D mechanisms to implement the interface dependant ones.
20
21%D For historic reasons all colors are defined in \RGB\ color
22%D space and there is no reason to change this.
23
24\definecolor [red]           [r=1,   g=0,   b=0]
25\definecolor [green]         [r=0,   g=1,   b=0]
26\definecolor [blue]          [r=0,   g=0,   b=1]
27
28\definecolor [cyan]          [r=0,   g=1,   b=1]
29\definecolor [magenta]       [r=1,   g=0,   b=1]
30\definecolor [yellow]        [r=1,   g=1,   b=0]
31
32\definecolor [white]         [s=1] % [r=1,   g=1,   b=1]
33\definecolor [black]         [s=0]
34\definecolor [gray]          [s=.9]
35
36% adapted per 2011.10.28
37
38% \definecolor [lightred]      [r=1,   g=0,   b=0]
39% \definecolor [lightgreen]    [r=0,   g=1,   b=0]
40% \definecolor [lightblue]     [r=0,   g=0,   b=1]
41% \definecolor [lightcyan]     [r=0,   g=1,   b=1]
42% \definecolor [lightmagenta]  [r=1,   g=0,   b=1]
43% \definecolor [lightyellow]   [r=1,   g=1,   b=0]
44
45\definecolor [lightred]      [r=1,    g=0.5, b=0.5] % [.5(red,white)]
46\definecolor [lightgreen]    [r=0.5,  g=1,   b=0.5] % [.5(green,white)]
47\definecolor [lightblue]     [r=0.5,  g=0.5, b=1]   % [.5(blue,white)]
48\definecolor [lightcyan]     [r=0.5,  g=1,   b=1]   % [.5(cyan,white)]
49\definecolor [lightmagenta]  [r=1,    g=0.5, b=1]   % [.5(magenta,white)]
50\definecolor [lightyellow]   [r=1,    g=1,   b=0.5] % [.5(yellow,white)]
51
52\definecolor [middlered]     [r=.8,  g=0,   b=0]
53\definecolor [middlegreen]   [r=0,   g=.8,  b=0]
54\definecolor [middleblue]    [r=0,   g=0,   b=.8]
55\definecolor [middlecyan]    [r=0,   g=.6,  b=.6]
56\definecolor [middlemagenta] [r=.6,  g=0,   b=.6]
57\definecolor [middleyellow]  [r=.6,  g=.6,  b=.0]
58
59\definecolor [darkred]       [r=.6,  g=0,   b=0]
60\definecolor [darkgreen]     [r=0,   g=.6,  b=0]
61\definecolor [darkblue]      [r=0,   g=0,   b=.6]
62\definecolor [darkcyan]      [r=0,   g=.4,  b=.4]
63\definecolor [darkmagenta]   [r=.4,  g=0,   b=.4]
64\definecolor [darkyellow]    [r=.4,  g=.4,  b=0]
65
66\definecolor [darkgray]      [s=.40]
67\definecolor [middlegray]    [s=.625]
68\definecolor [lightgray]     [s=.85]
69\definecolor [palegray]      [s=.75]
70
71% new per 2017-10-15 (for mp named colors)
72
73\definecolor [gray-1]        [s=.1]
74\definecolor [gray-2]        [s=.2]
75\definecolor [gray-3]        [s=.3]
76\definecolor [gray-4]        [s=.4]
77\definecolor [gray-5]        [s=.5]
78\definecolor [gray-6]        [s=.6]
79\definecolor [gray-7]        [s=.7]
80\definecolor [gray-8]        [s=.8]
81\definecolor [gray-9]        [s=.9]
82
83%D These colors are mapped to interface dependant colornames.
84
85\startinterface dutch
86
87  \definecolor [rood]          [red]
88  \definecolor [groen]         [green]
89  \definecolor [blauw]         [blue]
90
91  \definecolor [cyaan]         [cyan]
92  \definecolor [magenta]       [magenta]
93  \definecolor [geel]          [yellow]
94
95  \definecolor [wit]           [white]
96  \definecolor [grijs]         [gray]
97  \definecolor [zwart]         [black]
98
99  \definecolor [donkerrood]    [darkred]
100  \definecolor [middelrood]    [middlered]
101  \definecolor [lichtrood]     [lightred]
102
103  \definecolor [donkergroen]   [darkgreen]
104  \definecolor [middelgroen]   [middlegreen]
105  \definecolor [lichtgroen]    [lightgreen]
106
107  \definecolor [donkerblauw]   [darkblue]
108  \definecolor [middelblauw]   [middleblue]
109  \definecolor [lichtblauw]    [lightblue]
110
111  \definecolor [donkercyaan]   [darkcyan]
112  \definecolor [middelcyaan]   [middlecyan]
113  \definecolor [lichtcyaan]    [lightcyan]
114
115  \definecolor [donkermagenta] [darkmagenta]
116  \definecolor [middelmagenta] [middlemagenta]
117  \definecolor [lichtmagenta]  [lightmagenta]
118
119  \definecolor [donkergeel]    [darkyellow]
120  \definecolor [middelgeel]    [middleyellow]
121  \definecolor [lichtgeel]     [lightyellow]
122
123  \definecolor [donkergrijs]   [darkgray]
124  \definecolor [middengrijs]   [middlegray]
125  \definecolor [lichtgrijs]    [lightgray]
126
127\stopinterface
128
129\startinterface german
130
131  \definecolor [rot]           [red]
132  \definecolor [gruen]         [green]
133  \definecolor [blau]          [blue]
134
135  %definecolor [cyan]          [cyan]
136  %definecolor [magenta]       [magenta]
137  \definecolor [gelb]          [yellow]
138
139  \definecolor [weiss]         [white]
140  \definecolor [grau]          [gray]
141  \definecolor [schwarz]       [black]
142
143  \definecolor [dunkelrot]     [darkred]
144  \definecolor [mittelrot]     [middlered]
145  \definecolor [hellrot]       [lightred]
146
147  \definecolor [dunkelgruen]   [darkgreen]
148  \definecolor [mittelgruen]   [middlegreen]
149  \definecolor [hellgruen]     [lightgreen]
150
151  \definecolor [dunkelblau]    [darkblue]
152  \definecolor [mittelblau]    [middleblue]
153  \definecolor [hellblau]      [lightblue]
154
155  \definecolor [dunkelcyan]    [darkcyan]
156  \definecolor [mittelcyan]    [middlecyan]
157  \definecolor [hellcyan]      [lightcyan]
158
159  \definecolor [dunkelmagenta] [darkmagenta]
160  \definecolor [mittelmagenta] [middlemagenta]
161  \definecolor [hellmagenta]   [lightmagenta]
162
163  \definecolor [dunkelgelb]    [darkyellow]
164  \definecolor [mittelgelb]    [middleyellow]
165  \definecolor [hellgelb]      [lightyellow]
166
167  \definecolor [dunkelgrau]    [darkgray]
168  \definecolor [mittelgrau]    [middlegray]
169  \definecolor [hellgrau]      [lightgray]
170
171\stopinterface
172
173\startinterface czech
174
175  \definecolor [cervena]        [red]
176  \definecolor [zelena]         [green]
177  \definecolor [modra]          [blue]
178
179  \definecolor [azurova]        [cyan]
180  \definecolor [fialova]        [magenta]
181  \definecolor [zluta]          [yellow]
182
183  \definecolor [bila]           [white]
184  \definecolor [cerna]          [black]
185
186  \definecolor [tmavecervena]   [darkred]
187  \definecolor [strednecervena] [middlered]
188  \definecolor [svetlecervena]  [lightred]
189
190  \definecolor [tmavezelena]    [darkgreen]
191  \definecolor [strednezelena]  [middlegreen]
192  \definecolor [svetlezelena]   [lightgreen]
193
194  \definecolor [tmavemodra]     [darkblue]
195  \definecolor [strednemodra]   [middleblue]
196  \definecolor [svetlemodra]    [lightblue]
197
198  \definecolor [tmaveazurova]   [darkcyan]
199  \definecolor [stredneazurova] [middlecyan]
200  \definecolor [svelteazurova]  [lightcyan]
201
202  \definecolor [tmavefialova]   [darkmagenta]
203  \definecolor [strednefialova] [middlemagenta]
204  \definecolor [sveltefialova]  [lightmagenta]
205
206  \definecolor [tmavezluta]     [darkyellow]
207  \definecolor [strednezluta]   [middleyellow]
208  \definecolor [sveltezluta]    [lightyellow]
209
210  \definecolor [tmaveseda]      [darkgray]
211  \definecolor [stredneseda]    [middlegray]
212  \definecolor [svetleseda]     [lightgray]
213
214\stopinterface
215
216\startinterface italian
217
218  \definecolor [rosso]         [red]
219  \definecolor [verde]         [green]
220  \definecolor [blu]           [blue]
221
222  \definecolor [azzurro]       [cyan]
223  \definecolor [turchino]      [cyan]
224  \definecolor [ciano]         [cyan]
225  \definecolor [cremisi]       [magenta]
226  \definecolor [giallo]        [yellow]
227
228  \definecolor [bianco]        [white]
229  \definecolor [grigio]        [gray]
230  \definecolor [nero]          [black]
231
232  \definecolor [rossoscuro]    [darkred]
233  \definecolor [rossomedio]    [middlered]
234  \definecolor [rossochiaro]   [lightred]
235
236  \definecolor [verdescuro]    [darkgreen]
237  \definecolor [verdemedio]    [middlegreen]
238  \definecolor [verdechiaro]   [lightgreen]
239
240  \definecolor [bluscuro]      [darkblue]
241  \definecolor [blumedio]      [middleblue]
242  \definecolor [bluchiaro]     [lightblue]
243
244  \definecolor [azzurroscuro]  [darkcyan]
245  \definecolor [azzurromedio]  [middlecyan]
246  \definecolor [azzurrochiaro] [lightcyan]
247
248  \definecolor [cremisiscuro]  [darkmagenta]
249  \definecolor [cremisimedio]  [middlemagenta]
250  \definecolor [cremisichiaro] [lightmagenta]
251
252  \definecolor [gialloscuro]     [darkyellow]
253  \definecolor [giallomedio]     [middleyellow]
254  \definecolor [giallochiaro]    [lightyellow]
255
256  \definecolor [grigioscuro]     [darkgray]
257  \definecolor [grigiomedio]     [middlegray]
258  \definecolor [grigiochiaro]    [lightgray]
259
260\stopinterface
261
262\startinterface french
263
264  \definecolor [rouge]         [red]
265  \definecolor [vert]          [green]
266  \definecolor [bleu]          [blue]
267
268  %\definecolor [cyan]          [cyan]
269  %\definecolor [magenta]       [magenta]
270  \definecolor [jaune]         [yellow]
271
272  \definecolor [blanche]       [white]
273  \definecolor [gris]          [gray]
274  \definecolor [noir]          [black]
275
276  \definecolor [rougefoncé]    [darkred]
277  \definecolor [rougemoyen]    [middlered]
278  \definecolor [rougeclair]    [lightred]
279
280  \definecolor [vertfoncé]     [darkgreen]
281  \definecolor [vertmoyen]     [middlegreen]
282  \definecolor [vertclair]     [lightgreen]
283
284  \definecolor [bleufoncé]     [darkblue]
285  \definecolor [bleumoyen]     [middleblue]
286  \definecolor [bleuclair]     [lightblue]
287
288  \definecolor [cyanfoncé]     [darkcyan]
289  \definecolor [cyanmoyen]     [middlecyan]
290  \definecolor [cyanclair]     [lightcyan]
291
292  \definecolor [magentafoncé]  [darkmagenta]
293  \definecolor [magentamoyen]  [middlemagenta]
294  \definecolor [magentaclair]  [lightmagenta]
295
296  \definecolor [jaunefoncé]    [darkyellow]
297  \definecolor [jaunemoyen]    [middleyellow]
298  \definecolor [jauneclair]    [lightyellow]
299
300  \definecolor [grisfoncé]     [darkgray]
301  \definecolor [grismoyen]     [middlegray]
302  \definecolor [grisclair]     [lightgray]
303
304\stopinterface
305
306\startinterface romanian
307
308  \definecolor [rosu]            [red]
309  \definecolor [verde]           [green]
310  \definecolor [albastru]        [blue]
311
312  \definecolor [cian]            [cyan]
313  %\definecolor [magenta]         [magenta]
314  \definecolor [galben]          [yellow]
315
316  \definecolor [alb]             [white]
317  \definecolor [gri]             [gray]
318  \definecolor [negru]           [black]
319
320  \definecolor [rosuinchis]      [darkred]
321  \definecolor [rosumediu]       [middlered]
322  \definecolor [rosudeschis]     [lightred]
323
324  \definecolor [verdeinchis]     [darkgreen]
325  \definecolor [verdemediu]      [middlegreen]
326  \definecolor [verdedeschis]    [lightgreen]
327
328  \definecolor [albastruinchis]  [darkblue]
329  \definecolor [albastrumediu]   [middleblue]
330  \definecolor [albastrudeschis] [lightblue]
331
332  \definecolor [cianinchis]      [darkcyan]
333  \definecolor [cianmediu]       [middlecyan]
334  \definecolor [ciandeschis]     [lightcyan]
335
336  \definecolor [magentainchis]   [darkmagenta]
337  \definecolor [magentamediu]    [middlemagenta]
338  \definecolor [magentadeschis]  [lightmagenta]
339
340  \definecolor [galbeninchis]    [darkyellow]
341  \definecolor [galbenmediu]     [middleyellow]
342  \definecolor [galbendeschis]   [lightyellow]
343
344  \definecolor [griinchis]       [darkgray]
345  \definecolor [grimediu]        [middlegray]
346  \definecolor [grideschis]      [lightgray]
347
348\stopinterface
349
350%D Bonus (needed for FO test):
351
352\definecolor [orange]       [r=1, g=.5]
353\definecolor [lightorange]  [r=1, g=.5]
354\definecolor [middleorange] [r=.6,g=.3]
355\definecolor [darkorange]   [r=.4,g=.2]
356
357\endinput
358