forked from markjessell/functionNoddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolor.h
469 lines (430 loc) · 15.9 KB
/
color.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
#define NUM_PREDEFINED_COLORS 216 /* 144 */
#define NUM_CUSTOM_COLORS 10
static NODDY_COLOUR customColors[NUM_CUSTOM_COLORS] = {
{ 255, 255, 255, "Custom Colour 1" },
{ 0, 0, 0, "Custom Colour 2" },
{ 0, 0, 255, "Custom Colour 3" },
{ 0, 255, 0, "Custom Colour 4" },
{ 255, 0, 0, "Custom Colour 5" },
{ 255, 255, 255, "Custom Colour 6" },
{ 0, 0, 0, "Custom Colour 7" },
{ 0, 0, 255, "Custom Colour 8" },
{ 0, 255, 0, "Custom Colour 9" },
{ 255, 0, 0, "Custom Colour 10" }
};
static NODDY_COLOUR predefinedColors[NUM_PREDEFINED_COLORS] = {
{ 255,255,255, "Color 1,1" },
{ 255,255,204, "Color 1,2" },
{ 255,255,153, "Color 1,3" },
{ 255,255,102, "Color 1,4" },
{ 255,255,51, "Color 1,5" },
{ 255,255,0, "Color 1,6" },
{ 255,204,255, "Color 2,1" },
{ 255,204,204, "Color 2,2" },
{ 255,204,153, "Color 2,3" },
{ 255,204,102, "Color 2,4" },
{ 255,204,51, "Color 2,5" },
{ 255,204,0, "Color 2,6" },
{ 255,153,255, "Color 3,1" },
{ 255,153,204, "Color 3,2" },
{ 255,153,153, "Color 3,3" },
{ 255,153,102, "Color 3,4" },
{ 255,153,51, "Color 3,5" },
{ 255,153,0, "Color 3,6" },
{ 255,102,255, "Color 4,1" },
{ 255,102,204, "Color 4,2" },
{ 255,102,153, "Color 4,3" },
{ 255,102,102, "Color 4,4" },
{ 255,102,51, "Color 4,5" },
{ 255,102,0, "Color 4,6" },
{ 255,51,255, "Color 5,1" },
{ 255,51,204, "Color 5,2" },
{ 255,51,153, "Color 5,3" },
{ 255,51,102, "Color 5,4" },
{ 255,51,51, "Color 5,5" },
{ 255,51,0, "Color 5,6" },
{ 255,0,255, "Color 6,1" },
{ 255,0,204, "Color 6,2" },
{ 255,0,153, "Color 6,3" },
{ 255,0,102, "Color 6,4" },
{ 255,0,51, "Color 6,5" },
{ 255,0,0, "Color 6,6" },
{ 204,255,255, "Color 7,1" },
{ 204,255,204, "Color 7,2" },
{ 204,255,153, "Color 7,3" },
{ 204,255,102, "Color 7,4" },
{ 204,255,51, "Color 7,5" },
{ 204,255,0, "Color 7,6" },
{ 204,204,255, "Color 8,1" },
{ 204,204,204, "Color 8,2" },
{ 204,204,153, "Color 8,3" },
{ 204,204,102, "Color 8,4" },
{ 204,204,51, "Color 8,5" },
{ 204,204,0, "Color 8,6" },
{ 204,153,255, "Color 9,1" },
{ 204,153,204, "Color 9,2" },
{ 204,153,153, "Color 9,3" },
{ 204,153,102, "Color 9,4" },
{ 204,153,51, "Color 9,5" },
{ 204,153,0, "Color 9,6" },
{ 204,102,255, "Color 10,1" },
{ 204,102,204, "Color 10,2" },
{ 204,102,153, "Color 10,3" },
{ 204,102,102, "Color 10,4" },
{ 204,102,51, "Color 10,5" },
{ 204,102,0, "Color 10,6" },
{ 204,51,255, "Color 11,1" },
{ 204,51,204, "Color 11,2" },
{ 204,51,153, "Color 11,3" },
{ 204,51,102, "Color 11,4" },
{ 204,51,51, "Color 11,5" },
{ 204,51,0, "Color 11,6" },
{ 204,0,255, "Color 12,1" },
{ 204,0,204, "Color 12,2" },
{ 204,0,153, "Color 12,3" },
{ 204,0,102, "Color 12,4" },
{ 204,0,51, "Color 12,5" },
{ 204,0,0, "Color 12,6" },
{ 153,255,255, "Color 13,1" },
{ 153,255,204, "Color 13,2" },
{ 153,255,153, "Color 13,3" },
{ 153,255,102, "Color 13,4" },
{ 153,255,51, "Color 13,5" },
{ 153,255,0, "Color 13,6" },
{ 153,204,255, "Color 14,1" },
{ 153,204,204, "Color 14,2" },
{ 153,204,153, "Color 14,3" },
{ 153,204,102, "Color 14,4" },
{ 153,204,51, "Color 14,5" },
{ 153,204,0, "Color 14,6" },
{ 153,153,255, "Color 15,1" },
{ 153,153,204, "Color 15,2" },
{ 153,153,153, "Color 15,3" },
{ 153,153,102, "Color 15,4" },
{ 153,153,51, "Color 15,5" },
{ 153,153,0, "Color 15,6" },
{ 153,102,255, "Color 16,1" },
{ 153,102,204, "Color 16,2" },
{ 153,102,153, "Color 16,3" },
{ 153,102,102, "Color 16,4" },
{ 153,102,51, "Color 16,5" },
{ 153,102,0, "Color 16,6" },
{ 153,51,255, "Color 17,1" },
{ 153,51,204, "Color 17,2" },
{ 153,51,153, "Color 17,3" },
{ 153,51,102, "Color 17,4" },
{ 153,51,51, "Color 17,5" },
{ 153,51,0, "Color 17,6" },
{ 153,0,255, "Color 18,1" },
{ 153,0,204, "Color 18,2" },
{ 153,0,153, "Color 18,3" },
{ 153,0,102, "Color 18,4" },
{ 153,0,51, "Color 18,5" },
{ 153,0,0, "Color 18,6" },
{ 102,255,255, "Color 19,1" },
{ 102,255,204, "Color 19,2" },
{ 102,255,153, "Color 19,3" },
{ 102,255,102, "Color 19,4" },
{ 102,255,51, "Color 19,5" },
{ 102,255,0, "Color 19,6" },
{ 102,204,255, "Color 20,1" },
{ 102,204,204, "Color 20,2" },
{ 102,204,153, "Color 20,3" },
{ 102,204,102, "Color 20,4" },
{ 102,204,51, "Color 20,5" },
{ 102,204,0, "Color 20,6" },
{ 102,153,255, "Color 21,1" },
{ 102,153,204, "Color 21,2" },
{ 102,153,153, "Color 21,3" },
{ 102,153,102, "Color 21,4" },
{ 102,153,51, "Color 21,5" },
{ 102,153,0, "Color 21,6" },
{ 102,102,255, "Color 22,1" },
{ 102,102,204, "Color 22,2" },
{ 102,102,153, "Color 22,3" },
{ 102,102,102, "Color 22,4" },
{ 102,102,51, "Color 22,5" },
{ 102,102,0, "Color 22,6" },
{ 102,51,255, "Color 23,1" },
{ 102,51,204, "Color 23,2" },
{ 102,51,153, "Color 23,3" },
{ 102,51,102, "Color 23,4" },
{ 102,51,51, "Color 23,5" },
{ 102,51,0, "Color 23,6" },
{ 102,0,255, "Color 24,1" },
{ 102,0,204, "Color 24,2" },
{ 102,0,153, "Color 24,3" },
{ 102,0,102, "Color 24,4" },
{ 102,0,51, "Color 24,5" },
{ 102,0,0, "Color 24,6" },
{ 51,255,255, "Color 25,1" },
{ 51,255,204, "Color 25,2" },
{ 51,255,153, "Color 25,3" },
{ 51,255,102, "Color 25,4" },
{ 51,255,51, "Color 25,5" },
{ 51,255,0, "Color 25,6" },
{ 51,204,255, "Color 26,1" },
{ 51,204,204, "Color 26,2" },
{ 51,204,153, "Color 26,3" },
{ 51,204,102, "Color 26,4" },
{ 51,204,51, "Color 26,5" },
{ 51,204,0, "Color 26,6" },
{ 51,153,255, "Color 27,1" },
{ 51,153,204, "Color 27,2" },
{ 51,153,153, "Color 27,3" },
{ 51,153,102, "Color 27,4" },
{ 51,153,51, "Color 27,5" },
{ 51,153,0, "Color 27,6" },
{ 51,102,255, "Color 28,1" },
{ 51,102,204, "Color 28,2" },
{ 51,102,153, "Color 28,3" },
{ 51,102,102, "Color 28,4" },
{ 51,102,51, "Color 28,5" },
{ 51,102,0, "Color 28,6" },
{ 51,51,255, "Color 29,1" },
{ 51,51,204, "Color 29,2" },
{ 51,51,153, "Color 29,3" },
{ 51,51,102, "Color 29,4" },
{ 51,51,51, "Color 29,5" },
{ 51,51,0, "Color 29,6" },
{ 51,0,255, "Color 30,1" },
{ 51,0,204, "Color 30,2" },
{ 51,0,153, "Color 30,3" },
{ 51,0,102, "Color 30,4" },
{ 51,0,51, "Color 30,5" },
{ 51,0,0, "Color 30,6" },
{ 0,255,255, "Color 31,1" },
{ 0,255,204, "Color 31,2" },
{ 0,255,153, "Color 31,3" },
{ 0,255,102, "Color 31,4" },
{ 0,255,51, "Color 31,5" },
{ 0,255,0, "Color 31,6" },
{ 0,204,255, "Color 32,1" },
{ 0,204,204, "Color 32,2" },
{ 0,204,153, "Color 32,3" },
{ 0,204,102, "Color 32,4" },
{ 0,204,51, "Color 32,5" },
{ 0,204,0, "Color 32,6" },
{ 0,153,255, "Color 33,1" },
{ 0,153,204, "Color 33,2" },
{ 0,153,153, "Color 33,3" },
{ 0,153,102, "Color 33,4" },
{ 0,153,51, "Color 33,5" },
{ 0,153,0, "Color 33,6" },
{ 0,102,255, "Color 34,1" },
{ 0,102,204, "Color 34,2" },
{ 0,102,153, "Color 34,3" },
{ 0,102,102, "Color 34,4" },
{ 0,102,51, "Color 34,5" },
{ 0,102,0, "Color 34,6" },
{ 0,51,255, "Color 35,1" },
{ 0,51,204, "Color 35,2" },
{ 0,51,153, "Color 35,3" },
{ 0,51,102, "Color 35,4" },
{ 0,51,51, "Color 35,5" },
{ 0,51,0, "Color 35,6" },
{ 0,0,255, "Color 36,1" },
{ 0,0,204, "Color 36,2" },
{ 0,0,153, "Color 36,3" },
{ 0,0,102, "Color 36,4" },
{ 0,0,51, "Color 36,5" },
{ 0,0,0, "Color 36,6" }
/*
{ 238,0,0, "Color 216" },
{ 221,0,0, "Color 217" },
{ 187,0,0, "Color 218" },
{ 170,0,0, "Color 219" },
{ 136,0,0, "Color 220" },
{ 119,0,0, "Color 221" },
{ 85,0,0, "Color 222" },
{ 68,0,0, "Color 223" },
{ 34,0,0, "Color 224" },
{ 17,0,0, "Color 225" },
{ 0,238,0, "Color 226" },
{ 0,221,0, "Color 227" },
{ 0,187,0, "Color 228" },
{ 0,170,0, "Color 229" },
{ 0,136,0, "Color 230" },
{ 0,119,0, "Color 231" },
{ 0,85,0, "Color 232" },
{ 0,68,0, "Color 233" },
{ 0,34,0, "Color 234" },
{ 0,17,0, "Color 235" },
{ 0,0,238, "Color 236" },
{ 0,0,221, "Color 237" },
{ 0,0,187, "Color 238" },
{ 0,0,170, "Color 239" },
{ 0,0,136, "Color 240" },
{ 0,0,119, "Color 241" },
{ 0,0,85, "Color 242" },
{ 0,0,68, "Color 243" },
{ 0,0,34, "Color 244" },
{ 0,0,17, "Color 245" },
{ 238,238,238, "Color 246" },
{ 221,221,221, "Color 247" },
{ 187,187,187, "Color 248" },
{ 170,170,170, "Color 249" },
{ 136,136,136, "Color 250" },
{ 119,119,119, "Color 251" },
{ 85,85,85, "Color 252" },
{ 68,68,68, "Color 253" },
{ 34,34,34, "Color 254" },
{ 17,17,17, "Color 255" }
*/
}; /* Black */
#ifdef PAUL
/* White */
{ 255, 255, 255, "White" },
{ 240, 255, 255, "Azure" },
{ 245, 255, 250, "Mintcream" },
{ 248, 248, 255, "Ghost White" },
{ 255, 250, 240, "Floralwhite" },
{ 253, 245, 230, "Oldlace" },
{ 250, 240, 230, "Linen" },
{ 255, 245, 238, "Seashell" },
{ 255, 240, 245, "Lavender Blush" },
{ 245, 245, 245, "White Smoke" },
{ 240, 248, 255, "Alice Blue" },
/* Cream */
{ 250, 250, 210, "Lightgoldenrodyellow" },
{ 255, 250, 205, "Lemon Chiffon" },
{ 255, 255, 224, "Lightyellow" },
{ 245, 245, 220, "Beige" },
{ 255, 255, 224, "Light Yellow" },
{ 250, 250, 210, "Light Goldenrod Yellow" },
{ 255, 228, 225, "Mistyrose" },
{ 250, 235, 215, "Antiquewhite" },
{ 255, 235, 205, "Blanchedalmond" },
{ 238, 232, 170, "Palegoldenrod" },
{ 245, 222, 179, "Wheat" },
{ 255, 218, 185, "Peachpuff" },
{ 255, 222, 173, "Navajo White" },
{ 255, 160, 122, "Lightsalmon1" },
{ 255, 160, 122, "Lightsalmon" },
{ 210, 180, 140, "Tan" },
{ 218, 165, 32, "Goldenrod" },
{ 205, 133, 63, "Peru" },
{ 160, 82, 45, "Sienna" },
{ 139, 90, 43, "Tan4" },
{ 210, 105, 30, "Chocolate" },
{ 222, 184, 135, "Burlywood" },
{ 189, 183, 107, "Dark Khaki" },
/* Yellows */
{ 238, 201, 0, "Gold2" },
{ 255, 215, 0, "Gold" },
{ 238, 221, 130, "Lightgoldenrod" },
{ 255, 255, 0, "Yellow" },
/* Greens */
{ 173, 255, 47, "Greenyellow" },
{ 173, 255, 47, "Green Yellow" },
{ 124, 252, 0, "Lawn Green" },
{ 127, 255, 0, "Chartreuse" },
{ 0, 255, 127, "Spring Green" },
{ 152, 251, 152, "Palegreen" },
{ 0, 250, 154, "Medium Spring Green" },
{ 154, 205, 50, "Yellow Green" },
{ 0, 205, 05, "Yan3" },
{ 50, 205, 50, "Lime Green" },
{ 60, 179, 113, "Medium Sea Green" },
{ 34, 139, 34, "Forest Green" },
{ 46, 139, 87, "Sea Green" },
{ 46, 139, 87, "Eagreen" },
{ 0, 100, 0, "Dark Green" },
{ 65, 105, 25, "Oyal Blue" },
{ 85, 107, 47, "Dark Olive Green" },
{ 107, 142, 35, "Olivedrab" },
{ 143, 188, 143, "Dark Sea Green" },
{ 102, 205, 170, "Medium Aquamarine" },
/* Light Blues */
{ 175, 238, 238, "Pale Turquoise" },
{ 174, 238, 238, "Paleturquoise2" },
{ 152, 245, 255, "Cadetblue1" },
{ 230, 230, 250, "Lavender" },
{ 224, 255, 255, "Light Cyan" },
{ 176, 224, 230, "Powderblue" },
{ 173, 216, 230, "Light Blue" },
{ 176, 196, 222, "Light Steel Blue" },
{ 162, 181, 205, "Lightsteelblue3" },
{ 135, 206, 250, "Light Sky Blue" },
{ 135, 206, 235, "Sky Blue" },
{ 72, 209, 204, "Mediumturquoise" },
{ 64, 224, 208, "Turquoise" },
{ 0, 206, 209, "Dark Turquoise" },
{ 0, 205, 205, "Cyan3" },
{ 0, 191, 255, "Deepskyblue" },
{ 32, 178, 170, "Lightseagreen" },
{ 95, 158, 160, "Cadet Blue" },
{ 30, 144, 255, "Dodgerblue" },
{ 100, 149, 237, "Cornflowerblue" },
/* Dark Blues */
{ 0, 0, 205, "Medium Blue" },
{ 39, 64, 139, "Royalblue4" },
{ 25, 25, 112, "Midnight Blue" },
{ 0, 0, 128, "Navy Blue" },
{ 72, 61, 139, "Dark Slate Blue" },
{ 65, 105, 225, "Royalblue" },
{ 30, 144, 255, "Dodger Blue" },
{ 132, 112, 255, "Light Slate Blue" },
{ 123, 104, 238, "Medium Slate Blue" },
{ 147, 112, 219, "Medium Purple" },
{ 106, 90, 205, "Slate Blue" },
{ 138, 43, 226, "Blueviolet" },
{ 148, 0, 211, "Darkviolet" },
{ 160, 32, 240, "Purple" },
{ 70, 130, 180, "Steelblue" },
{ 147, 112, 219, "Mediumpurple" },
{ 153, 50, 204, "Dark Orchid" },
{ 186, 85, 211, "Medium Orchid" },
/* Reds */
{ 233, 150, 122, "Darksalmon" },
{ 240, 128, 128, "Light Coral" },
{ 238, 121, 159, "Palevioletred2" },
{ 255, 130, 171, "Palevioletred1" },
{ 255, 182, 193, "Lightpink" },
{ 219, 112, 147, "Pale Violet Red" },
{ 199, 21, 133, "Medium Violet Red" },
{ 208, 32, 144, "Violetred" },
{ 224, 102, 255, "Mediumorchid1" },
{ 238, 130, 238, "Violet" },
{ 255, 20, 147, "Deep Pink" },
{ 255, 0, 255, "Magenta" },
{ 255, 52, 179, "Maroon1" },
{ 255, 20, 147, "Deeppink" },
{ 255, 69, 0, "Orange Red" },
{ 255, 0, 0, "Red" },
{ 255, 99, 71, "Tomato" },
{ 238, 17, 23, "Plum2" },
{ 205, 92, 92, "Indianred" },
/* from Red to Brown */
{ 255, 127, 36, "Chocolate1" },
{ 255, 140, 0, "Darkorange" },
{ 255, 127, 80, "Coral" },
{ 244, 164, 96, "Sandybrown" },
{ 255, 165, 0, "Orange" },
{ 255, 160, 122, "Light Salmon" },
{ 250, 128, 114, "Salmon" },
{ 188, 143, 143, "Rosybrown" },
{ 184, 134, 11, "Dark Goldenrod" },
{ 139, 129, 76, "Lightgoldenrod4" },
{ 139, 121, 94, "Navajowhite4" },
{ 165, 42, 42, "Brown" },
{ 178, 34, 34, "Firebrick" },
{ 176, 48, 96, "Maroon" },
{ 139, 99, 108, "Pink4" },
{ 139, 69, 19, "Saddlebrown" },
/* going to Black */
{ 47, 79, 79, "Dark Slate Grey" },
{ 71, 71, 71, "Gray28" },
{ 61, 61, 61, "Gray24" },
{ 0, 0, 0, "Black" },
{ 105, 105, 105, "Dim Grey" },
{ 107, 107, 107, "Gray42" },
{ 112, 128, 144, "Slategrey" },
{ 119, 136, 153, "Light Slate Grey" },
{ 139, 131, 134, "Lavenderblush4" },
{ 205, 201, 165, "Lemonchiffon3" },
{ 211, 211, 211, "Lightgrey" },
{ 192, 192, 192, "Grey" },
{ 220, 220, 220, "Gainsboro" }
}; /* Black */
#endif