Debian Codegraph @

progressbar/terminal/colors.py

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 from __future__ import annotations
2
3 # Based on: https://www.ditig.com/256-colors-cheat-sheet
4 import os
5
6 from progressbar.terminal.base import HSL, RGB, ColorGradient, Colors
7
8 black = Colors.register(RGB(0, 0, 0), HSL(0, 0, 0), 'Black', 0)
9 maroon = Colors.register(RGB(128, 0, 0), HSL(0, 100, 25), 'Maroon', 1)
10 green = Colors.register(RGB(0, 128, 0), HSL(120, 100, 25), 'Green', 2)
11 olive = Colors.register(RGB(128, 128, 0), HSL(60, 100, 25), 'Olive', 3)
12 navy = Colors.register(RGB(0, 0, 128), HSL(240, 100, 25), 'Navy', 4)
13 purple = Colors.register(RGB(128, 0, 128), HSL(300, 100, 25), 'Purple', 5)
14 teal = Colors.register(RGB(0, 128, 128), HSL(180, 100, 25), 'Teal', 6)
15 silver = Colors.register(RGB(192, 192, 192), HSL(0, 0, 75), 'Silver', 7)
16 grey = Colors.register(RGB(128, 128, 128), HSL(0, 0, 50), 'Grey', 8)
17 red = Colors.register(RGB(255, 0, 0), HSL(0, 100, 50), 'Red', 9)
18 lime = Colors.register(RGB(0, 255, 0), HSL(120, 100, 50), 'Lime', 10)
19 yellow = Colors.register(RGB(255, 255, 0), HSL(60, 100, 50), 'Yellow', 11)
20 blue = Colors.register(RGB(0, 0, 255), HSL(240, 100, 50), 'Blue', 12)
21 fuchsia = Colors.register(RGB(255, 0, 255), HSL(300, 100, 50), 'Fuchsia', 13)
22 aqua = Colors.register(RGB(0, 255, 255), HSL(180, 100, 50), 'Aqua', 14)
23 white = Colors.register(RGB(255, 255, 255), HSL(0, 0, 100), 'White', 15)
24 grey0 = Colors.register(RGB(0, 0, 0), HSL(0, 0, 0), 'Grey0', 16)
25 navy_blue = Colors.register(RGB(0, 0, 95), HSL(240, 100, 18), 'NavyBlue', 17)
26 dark_blue = Colors.register(RGB(0, 0, 135), HSL(240, 100, 26), 'DarkBlue', 18)
27 blue3 = Colors.register(RGB(0, 0, 175), HSL(240, 100, 34), 'Blue3', 19)
28 blue3 = Colors.register(RGB(0, 0, 215), HSL(240, 100, 42), 'Blue3', 20)
29 blue1 = Colors.register(RGB(0, 0, 255), HSL(240, 100, 50), 'Blue1', 21)
30 dark_green = Colors.register(RGB(0, 95, 0), HSL(120, 100, 18), 'DarkGreen', 22)
31 deep_sky_blue4 = Colors.register(
32 RGB(0, 95, 95),
33 HSL(180, 100, 18),
34 'DeepSkyBlue4',
35 23,
36 )
37 deep_sky_blue4 = Colors.register(
38 RGB(0, 95, 135),
39 HSL(97, 100, 26),
40 'DeepSkyBlue4',
41 24,
42 )
43 deep_sky_blue4 = Colors.register(
44 RGB(0, 95, 175),
45 HSL(7, 100, 34),
46 'DeepSkyBlue4',
47 25,
48 )
49 dodger_blue3 = Colors.register(
50 RGB(0, 95, 215),
51 HSL(13, 100, 42),
52 'DodgerBlue3',
53 26,
54 )
55 dodger_blue2 = Colors.register(
56 RGB(0, 95, 255),
57 HSL(17, 100, 50),
58 'DodgerBlue2',
59 27,
60 )
61 green4 = Colors.register(RGB(0, 135, 0), HSL(120, 100, 26), 'Green4', 28)
62 spring_green4 = Colors.register(
63 RGB(0, 135, 95),
64 HSL(62, 100, 26),
65 'SpringGreen4',
66 29,
67 )
68 turquoise4 = Colors.register(
69 RGB(0, 135, 135),
70 HSL(180, 100, 26),
71 'Turquoise4',
72 30,
73 )
74 deep_sky_blue3 = Colors.register(
75 RGB(0, 135, 175),
76 HSL(93, 100, 34),
77 'DeepSkyBlue3',
78 31,
79 )
80 deep_sky_blue3 = Colors.register(
81 RGB(0, 135, 215),
82 HSL(2, 100, 42),
83 'DeepSkyBlue3',
84 32,
85 )
86 dodger_blue1 = Colors.register(
87 RGB(0, 135, 255),
88 HSL(8, 100, 50),
89 'DodgerBlue1',
90 33,
91 )
92 green3 = Colors.register(RGB(0, 175, 0), HSL(120, 100, 34), 'Green3', 34)
93 spring_green3 = Colors.register(
94 RGB(0, 175, 95),
95 HSL(52, 100, 34),
96 'SpringGreen3',
97 35,
98 )
99 dark_cyan = Colors.register(RGB(0, 175, 135), HSL(66, 100, 34), 'DarkCyan', 36)
100 light_sea_green = Colors.register(
101 RGB(0, 175, 175),
102 HSL(180, 100, 34),
103 'LightSeaGreen',
104 37,
105 )
106 deep_sky_blue2 = Colors.register(
107 RGB(0, 175, 215),
108 HSL(91, 100, 42),
109 'DeepSkyBlue2',
110 38,
111 )
112 deep_sky_blue1 = Colors.register(
113 RGB(0, 175, 255),
114 HSL(98, 100, 50),
115 'DeepSkyBlue1',
116 39,
117 )
118 green3 = Colors.register(RGB(0, 215, 0), HSL(120, 100, 42), 'Green3', 40)
119 spring_green3 = Colors.register(
120 RGB(0, 215, 95),
121 HSL(46, 100, 42),
122 'SpringGreen3',
123 41,
124 )
125 spring_green2 = Colors.register(
126 RGB(0, 215, 135),
127 HSL(57, 100, 42),
128 'SpringGreen2',
129 42,
130 )
131 cyan3 = Colors.register(RGB(0, 215, 175), HSL(68, 100, 42), 'Cyan3', 43)
132 dark_turquoise = Colors.register(
133 RGB(0, 215, 215),
134 HSL(180, 100, 42),
135 'DarkTurquoise',
136 44,
137 )
138 turquoise2 = Colors.register(
139 RGB(0, 215, 255),
140 HSL(89, 100, 50),
141 'Turquoise2',
142 45,
143 )
144 green1 = Colors.register(RGB(0, 255, 0), HSL(120, 100, 50), 'Green1', 46)
145 spring_green2 = Colors.register(
146 RGB(0, 255, 95),
147 HSL(42, 100, 50),
148 'SpringGreen2',
149 47,
150 )
151 spring_green1 = Colors.register(
152 RGB(0, 255, 135),
153 HSL(51, 100, 50),
154 'SpringGreen1',
155 48,
156 )
157 medium_spring_green = Colors.register(
158 RGB(0, 255, 175),
159 HSL(61, 100, 50),
160 'MediumSpringGreen',
161 49,
162 )
163 cyan2 = Colors.register(RGB(0, 255, 215), HSL(70, 100, 50), 'Cyan2', 50)
164 cyan1 = Colors.register(RGB(0, 255, 255), HSL(180, 100, 50), 'Cyan1', 51)
165 dark_red = Colors.register(RGB(95, 0, 0), HSL(0, 100, 18), 'DarkRed', 52)
166 deep_pink4 = Colors.register(
167 RGB(95, 0, 95),
168 HSL(300, 100, 18),
169 'DeepPink4',
170 53,
171 )
172 purple4 = Colors.register(RGB(95, 0, 135), HSL(82, 100, 26), 'Purple4', 54)
173 purple4 = Colors.register(RGB(95, 0, 175), HSL(72, 100, 34), 'Purple4', 55)
174 purple3 = Colors.register(RGB(95, 0, 215), HSL(66, 100, 42), 'Purple3', 56)
175 blue_violet = Colors.register(
176 RGB(95, 0, 255),
177 HSL(62, 100, 50),
178 'BlueViolet',
179 57,
180 )
181 orange4 = Colors.register(RGB(95, 95, 0), HSL(60, 100, 18), 'Orange4', 58)
182 grey37 = Colors.register(RGB(95, 95, 95), HSL(0, 0, 37), 'Grey37', 59)
183 medium_purple4 = Colors.register(
184 RGB(95, 95, 135),
185 HSL(240, 17, 45),
186 'MediumPurple4',
187 60,
188 )
189 slate_blue3 = Colors.register(
190 RGB(95, 95, 175),
191 HSL(240, 33, 52),
192 'SlateBlue3',
193 61,
194 )
195 slate_blue3 = Colors.register(
196 RGB(95, 95, 215),
197 HSL(240, 60, 60),
198 'SlateBlue3',
199 62,
200 )
201 royal_blue1 = Colors.register(
202 RGB(95, 95, 255),
203 HSL(240, 100, 68),
204 'RoyalBlue1',
205 63,
206 )
207 chartreuse4 = Colors.register(
208 RGB(95, 135, 0),
209 HSL(7, 100, 26),
210 'Chartreuse4',
211 64,
212 )
213 dark_sea_green4 = Colors.register(
214 RGB(95, 135, 95),
215 HSL(120, 17, 45),
216 'DarkSeaGreen4',
217 65,
218 )
219 pale_turquoise4 = Colors.register(
220 RGB(95, 135, 135),
221 HSL(180, 17, 45),
222 'PaleTurquoise4',
223 66,
224 )
225 steel_blue = Colors.register(
226 RGB(95, 135, 175),
227 HSL(210, 33, 52),
228 'SteelBlue',
229 67,
230 )
231 steel_blue3 = Colors.register(
232 RGB(95, 135, 215),
233 HSL(220, 60, 60),
234 'SteelBlue3',
235 68,
236 )
237 cornflower_blue = Colors.register(
238 RGB(95, 135, 255),
239 HSL(225, 100, 68),
240 'CornflowerBlue',
241 69,
242 )
243 chartreuse3 = Colors.register(
244 RGB(95, 175, 0),
245 HSL(7, 100, 34),
246 'Chartreuse3',
247 70,
248 )
249 dark_sea_green4 = Colors.register(
250 RGB(95, 175, 95),
251 HSL(120, 33, 52),
252 'DarkSeaGreen4',
253 71,
254 )
255 cadet_blue = Colors.register(
256 RGB(95, 175, 135),
257 HSL(150, 33, 52),
258 'CadetBlue',
259 72,
260 )
261 cadet_blue = Colors.register(
262 RGB(95, 175, 175),
263 HSL(180, 33, 52),
264 'CadetBlue',
265 73,
266 )
267 sky_blue3 = Colors.register(
268 RGB(95, 175, 215),
269 HSL(200, 60, 60),
270 'SkyBlue3',
271 74,
272 )
273 steel_blue1 = Colors.register(
274 RGB(95, 175, 255),
275 HSL(210, 100, 68),
276 'SteelBlue1',
277 75,
278 )
279 chartreuse3 = Colors.register(
280 RGB(95, 215, 0),
281 HSL(3, 100, 42),
282 'Chartreuse3',
283 76,
284 )
285 pale_green3 = Colors.register(
286 RGB(95, 215, 95),
287 HSL(120, 60, 60),
288 'PaleGreen3',
289 77,
290 )
291 sea_green3 = Colors.register(
292 RGB(95, 215, 135),
293 HSL(140, 60, 60),
294 'SeaGreen3',
295 78,
296 )
297 aquamarine3 = Colors.register(
298 RGB(95, 215, 175),
299 HSL(160, 60, 60),
300 'Aquamarine3',
301 79,
302 )
303 medium_turquoise = Colors.register(
304 RGB(95, 215, 215),
305 HSL(180, 60, 60),
306 'MediumTurquoise',
307 80,
308 )
309 steel_blue1 = Colors.register(
310 RGB(95, 215, 255),
311 HSL(195, 100, 68),
312 'SteelBlue1',
313 81,
314 )
315 chartreuse2 = Colors.register(
316 RGB(95, 255, 0),
317 HSL(7, 100, 50),
318 'Chartreuse2',
319 82,
320 )
321 sea_green2 = Colors.register(
322 RGB(95, 255, 95),
323 HSL(120, 100, 68),
324 'SeaGreen2',
325 83,
326 )
327 sea_green1 = Colors.register(
328 RGB(95, 255, 135),
329 HSL(135, 100, 68),
330 'SeaGreen1',
331 84,
332 )
333 sea_green1 = Colors.register(
334 RGB(95, 255, 175),
335 HSL(150, 100, 68),
336 'SeaGreen1',
337 85,
338 )
339 aquamarine1 = Colors.register(
340 RGB(95, 255, 215),
341 HSL(165, 100, 68),
342 'Aquamarine1',
343 86,
344 )
345 dark_slate_gray2 = Colors.register(
346 RGB(95, 255, 255),
347 HSL(180, 100, 68),
348 'DarkSlateGray2',
349 87,
350 )
351 dark_red = Colors.register(RGB(135, 0, 0), HSL(0, 100, 26), 'DarkRed', 88)
352 deep_pink4 = Colors.register(
353 RGB(135, 0, 95),
354 HSL(17, 100, 26),
355 'DeepPink4',
356 89,
357 )
358 dark_magenta = Colors.register(
359 RGB(135, 0, 135),
360 HSL(300, 100, 26),
361 'DarkMagenta',
362 90,
363 )
364 dark_magenta = Colors.register(
365 RGB(135, 0, 175),
366 HSL(86, 100, 34),
367 'DarkMagenta',
368 91,
369 )
370 dark_violet = Colors.register(
371 RGB(135, 0, 215),
372 HSL(77, 100, 42),
373 'DarkViolet',
374 92,
375 )
376 purple = Colors.register(RGB(135, 0, 255), HSL(71, 100, 50), 'Purple', 93)
377 orange4 = Colors.register(RGB(135, 95, 0), HSL(2, 100, 26), 'Orange4', 94)
378 light_pink4 = Colors.register(
379 RGB(135, 95, 95),
380 HSL(0, 17, 45),
381 'LightPink4',
382 95,
383 )
384 plum4 = Colors.register(RGB(135, 95, 135), HSL(300, 17, 45), 'Plum4', 96)
385 medium_purple3 = Colors.register(
386 RGB(135, 95, 175),
387 HSL(270, 33, 52),
388 'MediumPurple3',
389 97,
390 )
391 medium_purple3 = Colors.register(
392 RGB(135, 95, 215),
393 HSL(260, 60, 60),
394 'MediumPurple3',
395 98,
396 )
397 slate_blue1 = Colors.register(
398 RGB(135, 95, 255),
399 HSL(255, 100, 68),
400 'SlateBlue1',
401 99,
402 )
403 yellow4 = Colors.register(RGB(135, 135, 0), HSL(60, 100, 26), 'Yellow4', 100)
404 wheat4 = Colors.register(RGB(135, 135, 95), HSL(60, 17, 45), 'Wheat4', 101)
405 grey53 = Colors.register(RGB(135, 135, 135), HSL(0, 0, 52), 'Grey53', 102)
406 light_slate_grey = Colors.register(
407 RGB(135, 135, 175),
408 HSL(240, 20, 60),
409 'LightSlateGrey',
410 103,
411 )
412 medium_purple = Colors.register(
413 RGB(135, 135, 215),
414 HSL(240, 50, 68),
415 'MediumPurple',
416 104,
417 )
418 light_slate_blue = Colors.register(
419 RGB(135, 135, 255),
420 HSL(240, 100, 76),
421 'LightSlateBlue',
422 105,
423 )
424 yellow4 = Colors.register(RGB(135, 175, 0), HSL(3, 100, 34), 'Yellow4', 106)
425 dark_olive_green3 = Colors.register(
426 RGB(135, 175, 95),
427 HSL(90, 33, 52),
428 'DarkOliveGreen3',
429 107,
430 )
431 dark_sea_green = Colors.register(
432 RGB(135, 175, 135),
433 HSL(120, 20, 60),
434 'DarkSeaGreen',
435 108,
436 )
437 light_sky_blue3 = Colors.register(
438 RGB(135, 175, 175),
439 HSL(180, 20, 60),
440 'LightSkyBlue3',
441 109,
442 )
443 light_sky_blue3 = Colors.register(
444 RGB(135, 175, 215),
445 HSL(210, 50, 68),
446 'LightSkyBlue3',
447 110,
448 )
449 sky_blue2 = Colors.register(
450 RGB(135, 175, 255),
451 HSL(220, 100, 76),
452 'SkyBlue2',
453 111,
454 )
455 chartreuse2 = Colors.register(
456 RGB(135, 215, 0),
457 HSL(2, 100, 42),
458 'Chartreuse2',
459 112,
460 )
461 dark_olive_green3 = Colors.register(
462 RGB(135, 215, 95),
463 HSL(100, 60, 60),
464 'DarkOliveGreen3',
465 113,
466 )
467 pale_green3 = Colors.register(
468 RGB(135, 215, 135),
469 HSL(120, 50, 68),
470 'PaleGreen3',
471 114,
472 )
473 dark_sea_green3 = Colors.register(
474 RGB(135, 215, 175),
475 HSL(150, 50, 68),
476 'DarkSeaGreen3',
477 115,
478 )
479 dark_slate_gray3 = Colors.register(
480 RGB(135, 215, 215),
481 HSL(180, 50, 68),
482 'DarkSlateGray3',
483 116,
484 )
485 sky_blue1 = Colors.register(
486 RGB(135, 215, 255),
487 HSL(200, 100, 76),
488 'SkyBlue1',
489 117,
490 )
491 chartreuse1 = Colors.register(
492 RGB(135, 255, 0),
493 HSL(8, 100, 50),
494 'Chartreuse1',
495 118,
496 )
497 light_green = Colors.register(
498 RGB(135, 255, 95),
499 HSL(105, 100, 68),
500 'LightGreen',
501 119,
502 )
503 light_green = Colors.register(
504 RGB(135, 255, 135),
505 HSL(120, 100, 76),
506 'LightGreen',
507 120,
508 )
509 pale_green1 = Colors.register(
510 RGB(135, 255, 175),
511 HSL(140, 100, 76),
512 'PaleGreen1',
513 121,
514 )
515 aquamarine1 = Colors.register(
516 RGB(135, 255, 215),
517 HSL(160, 100, 76),
518 'Aquamarine1',
519 122,
520 )
521 dark_slate_gray1 = Colors.register(
522 RGB(135, 255, 255),
523 HSL(180, 100, 76),
524 'DarkSlateGray1',
525 123,
526 )
527 red3 = Colors.register(RGB(175, 0, 0), HSL(0, 100, 34), 'Red3', 124)
528 deep_pink4 = Colors.register(
529 RGB(175, 0, 95),
530 HSL(27, 100, 34),
531 'DeepPink4',
532 125,
533 )
534 medium_violet_red = Colors.register(
535 RGB(175, 0, 135),
536 HSL(13, 100, 34),
537 'MediumVioletRed',
538 126,
539 )
540 magenta3 = Colors.register(
541 RGB(175, 0, 175),
542 HSL(300, 100, 34),
543 'Magenta3',
544 127,
545 )
546 dark_violet = Colors.register(
547 RGB(175, 0, 215),
548 HSL(88, 100, 42),
549 'DarkViolet',
550 128,
551 )
552 purple = Colors.register(RGB(175, 0, 255), HSL(81, 100, 50), 'Purple', 129)
553 dark_orange3 = Colors.register(
554 RGB(175, 95, 0),
555 HSL(2, 100, 34),
556 'DarkOrange3',
557 130,
558 )
559 indian_red = Colors.register(
560 RGB(175, 95, 95),
561 HSL(0, 33, 52),
562 'IndianRed',
563 131,
564 )
565 hot_pink3 = Colors.register(
566 RGB(175, 95, 135),
567 HSL(330, 33, 52),
568 'HotPink3',
569 132,
570 )
571 medium_orchid3 = Colors.register(
572 RGB(175, 95, 175),
573 HSL(300, 33, 52),
574 'MediumOrchid3',
575 133,
576 )
577 medium_orchid = Colors.register(
578 RGB(175, 95, 215),
579 HSL(280, 60, 60),
580 'MediumOrchid',
581 134,
582 )
583 medium_purple2 = Colors.register(
584 RGB(175, 95, 255),
585 HSL(270, 100, 68),
586 'MediumPurple2',
587 135,
588 )
589 dark_goldenrod = Colors.register(
590 RGB(175, 135, 0),
591 HSL(6, 100, 34),
592 'DarkGoldenrod',
593 136,
594 )
595 light_salmon3 = Colors.register(
596 RGB(175, 135, 95),
597 HSL(30, 33, 52),
598 'LightSalmon3',
599 137,
600 )
601 rosy_brown = Colors.register(
602 RGB(175, 135, 135),
603 HSL(0, 20, 60),
604 'RosyBrown',
605 138,
606 )
607 grey63 = Colors.register(RGB(175, 135, 175), HSL(300, 20, 60), 'Grey63', 139)
608 medium_purple2 = Colors.register(
609 RGB(175, 135, 215),
610 HSL(270, 50, 68),
611 'MediumPurple2',
612 140,
613 )
614 medium_purple1 = Colors.register(
615 RGB(175, 135, 255),
616 HSL(260, 100, 76),
617 'MediumPurple1',
618 141,
619 )
620 gold3 = Colors.register(RGB(175, 175, 0), HSL(60, 100, 34), 'Gold3', 142)
621 dark_khaki = Colors.register(
622 RGB(175, 175, 95),
623 HSL(60, 33, 52),
624 'DarkKhaki',
625 143,
626 )
627 navajo_white3 = Colors.register(
628 RGB(175, 175, 135),
629 HSL(60, 20, 60),
630 'NavajoWhite3',
631 144,
632 )
633 grey69 = Colors.register(RGB(175, 175, 175), HSL(0, 0, 68), 'Grey69', 145)
634 light_steel_blue3 = Colors.register(
635 RGB(175, 175, 215),
636 HSL(240, 33, 76),
637 'LightSteelBlue3',
638 146,
639 )
640 light_steel_blue = Colors.register(
641 RGB(175, 175, 255),
642 HSL(240, 100, 84),
643 'LightSteelBlue',
644 147,
645 )
646 yellow3 = Colors.register(RGB(175, 215, 0), HSL(1, 100, 42), 'Yellow3', 148)
647 dark_olive_green3 = Colors.register(
648 RGB(175, 215, 95),
649 HSL(80, 60, 60),
650 'DarkOliveGreen3',
651 149,
652 )
653 dark_sea_green3 = Colors.register(
654 RGB(175, 215, 135),
655 HSL(90, 50, 68),
656 'DarkSeaGreen3',
657 150,
658 )
659 dark_sea_green2 = Colors.register(
660 RGB(175, 215, 175),
661 HSL(120, 33, 76),
662 'DarkSeaGreen2',
663 151,
664 )
665 light_cyan3 = Colors.register(
666 RGB(175, 215, 215),
667 HSL(180, 33, 76),
668 'LightCyan3',
669 152,
670 )
671 light_sky_blue1 = Colors.register(
672 RGB(175, 215, 255),
673 HSL(210, 100, 84),
674 'LightSkyBlue1',
675 153,
676 )
677 green_yellow = Colors.register(
678 RGB(175, 255, 0),
679 HSL(8, 100, 50),
680 'GreenYellow',
681 154,
682 )
683 dark_olive_green2 = Colors.register(
684 RGB(175, 255, 95),
685 HSL(90, 100, 68),
686 'DarkOliveGreen2',
687 155,
688 )
689 pale_green1 = Colors.register(
690 RGB(175, 255, 135),
691 HSL(100, 100, 76),
692 'PaleGreen1',
693 156,
694 )
695 dark_sea_green2 = Colors.register(
696 RGB(175, 255, 175),
697 HSL(120, 100, 84),
698 'DarkSeaGreen2',
699 157,
700 )
701 dark_sea_green1 = Colors.register(
702 RGB(175, 255, 215),
703 HSL(150, 100, 84),
704 'DarkSeaGreen1',
705 158,
706 )
707 pale_turquoise1 = Colors.register(
708 RGB(175, 255, 255),
709 HSL(180, 100, 84),
710 'PaleTurquoise1',
711 159,
712 )
713 red3 = Colors.register(RGB(215, 0, 0), HSL(0, 100, 42), 'Red3', 160)
714 deep_pink3 = Colors.register(
715 RGB(215, 0, 95),
716 HSL(33, 100, 42),
717 'DeepPink3',
718 161,
719 )
720 deep_pink3 = Colors.register(
721 RGB(215, 0, 135),
722 HSL(22, 100, 42),
723 'DeepPink3',
724 162,
725 )
726 magenta3 = Colors.register(RGB(215, 0, 175), HSL(11, 100, 42), 'Magenta3', 163)
727 magenta3 = Colors.register(
728 RGB(215, 0, 215),
729 HSL(300, 100, 42),
730 'Magenta3',
731 164,
732 )
733 magenta2 = Colors.register(RGB(215, 0, 255), HSL(90, 100, 50), 'Magenta2', 165)
734 dark_orange3 = Colors.register(
735 RGB(215, 95, 0),
736 HSL(6, 100, 42),
737 'DarkOrange3',
738 166,
739 )
740 indian_red = Colors.register(
741 RGB(215, 95, 95),
742 HSL(0, 60, 60),
743 'IndianRed',
744 167,
745 )
746 hot_pink3 = Colors.register(
747 RGB(215, 95, 135),
748 HSL(340, 60, 60),
749 'HotPink3',
750 168,
751 )
752 hot_pink2 = Colors.register(
753 RGB(215, 95, 175),
754 HSL(320, 60, 60),
755 'HotPink2',
756 169,
757 )
758 orchid = Colors.register(RGB(215, 95, 215), HSL(300, 60, 60), 'Orchid', 170)
759 medium_orchid1 = Colors.register(
760 RGB(215, 95, 255),
761 HSL(285, 100, 68),
762 'MediumOrchid1',
763 171,
764 )
765 orange3 = Colors.register(RGB(215, 135, 0), HSL(7, 100, 42), 'Orange3', 172)
766 light_salmon3 = Colors.register(
767 RGB(215, 135, 95),
768 HSL(20, 60, 60),
769 'LightSalmon3',
770 173,
771 )
772 light_pink3 = Colors.register(
773 RGB(215, 135, 135),
774 HSL(0, 50, 68),
775 'LightPink3',
776 174,
777 )
778 pink3 = Colors.register(RGB(215, 135, 175), HSL(330, 50, 68), 'Pink3', 175)
779 plum3 = Colors.register(RGB(215, 135, 215), HSL(300, 50, 68), 'Plum3', 176)
780 violet = Colors.register(RGB(215, 135, 255), HSL(280, 100, 76), 'Violet', 177)
781 gold3 = Colors.register(RGB(215, 175, 0), HSL(8, 100, 42), 'Gold3', 178)
782 light_goldenrod3 = Colors.register(
783 RGB(215, 175, 95),
784 HSL(40, 60, 60),
785 'LightGoldenrod3',
786 179,
787 )
788 tan = Colors.register(RGB(215, 175, 135), HSL(30, 50, 68), 'Tan', 180)
789 misty_rose3 = Colors.register(
790 RGB(215, 175, 175),
791 HSL(0, 33, 76),
792 'MistyRose3',
793 181,
794 )
795 thistle3 = Colors.register(
796 RGB(215, 175, 215),
797 HSL(300, 33, 76),
798 'Thistle3',
799 182,
800 )
801 plum2 = Colors.register(RGB(215, 175, 255), HSL(270, 100, 84), 'Plum2', 183)
802 yellow3 = Colors.register(RGB(215, 215, 0), HSL(60, 100, 42), 'Yellow3', 184)
803 khaki3 = Colors.register(RGB(215, 215, 95), HSL(60, 60, 60), 'Khaki3', 185)
804 light_goldenrod2 = Colors.register(
805 RGB(215, 215, 135),
806 HSL(60, 50, 68),
807 'LightGoldenrod2',
808 186,
809 )
810 light_yellow3 = Colors.register(
811 RGB(215, 215, 175),
812 HSL(60, 33, 76),
813 'LightYellow3',
814 187,
815 )
816 grey84 = Colors.register(RGB(215, 215, 215), HSL(0, 0, 84), 'Grey84', 188)
817 light_steel_blue1 = Colors.register(
818 RGB(215, 215, 255),
819 HSL(240, 100, 92),
820 'LightSteelBlue1',
821 189,
822 )
823 yellow2 = Colors.register(RGB(215, 255, 0), HSL(9, 100, 50), 'Yellow2', 190)
824 dark_olive_green1 = Colors.register(
825 RGB(215, 255, 95),
826 HSL(75, 100, 68),
827 'DarkOliveGreen1',
828 191,
829 )
830 dark_olive_green1 = Colors.register(
831 RGB(215, 255, 135),
832 HSL(80, 100, 76),
833 'DarkOliveGreen1',
834 192,
835 )
836 dark_sea_green1 = Colors.register(
837 RGB(215, 255, 175),
838 HSL(90, 100, 84),
839 'DarkSeaGreen1',
840 193,
841 )
842 honeydew2 = Colors.register(
843 RGB(215, 255, 215),
844 HSL(120, 100, 92),
845 'Honeydew2',
846 194,
847 )
848 light_cyan1 = Colors.register(
849 RGB(215, 255, 255),
850 HSL(180, 100, 92),
851 'LightCyan1',
852 195,
853 )
854 red1 = Colors.register(RGB(255, 0, 0), HSL(0, 100, 50), 'Red1', 196)
855 deep_pink2 = Colors.register(
856 RGB(255, 0, 95),
857 HSL(37, 100, 50),
858 'DeepPink2',
859 197,
860 )
861 deep_pink1 = Colors.register(
862 RGB(255, 0, 135),
863 HSL(28, 100, 50),
864 'DeepPink1',
865 198,
866 )
867 deep_pink1 = Colors.register(
868 RGB(255, 0, 175),
869 HSL(18, 100, 50),
870 'DeepPink1',
871 199,
872 )
873 magenta2 = Colors.register(RGB(255, 0, 215), HSL(9, 100, 50), 'Magenta2', 200)
874 magenta1 = Colors.register(
875 RGB(255, 0, 255),
876 HSL(300, 100, 50),
877 'Magenta1',
878 201,
879 )
880 orange_red1 = Colors.register(
881 RGB(255, 95, 0),
882 HSL(2, 100, 50),
883 'OrangeRed1',
884 202,
885 )
886 indian_red1 = Colors.register(
887 RGB(255, 95, 95),
888 HSL(0, 100, 68),
889 'IndianRed1',
890 203,
891 )
892 indian_red1 = Colors.register(
893 RGB(255, 95, 135),
894 HSL(345, 100, 68),
895 'IndianRed1',
896 204,
897 )
898 hot_pink = Colors.register(
899 RGB(255, 95, 175),
900 HSL(330, 100, 68),
901 'HotPink',
902 205,
903 )
904 hot_pink = Colors.register(
905 RGB(255, 95, 215),
906 HSL(315, 100, 68),
907 'HotPink',
908 206,
909 )
910 medium_orchid1 = Colors.register(
911 RGB(255, 95, 255),
912 HSL(300, 100, 68),
913 'MediumOrchid1',
914 207,
915 )
916 dark_orange = Colors.register(
917 RGB(255, 135, 0),
918 HSL(1, 100, 50),
919 'DarkOrange',
920 208,
921 )
922 salmon1 = Colors.register(RGB(255, 135, 95), HSL(15, 100, 68), 'Salmon1', 209)
923 light_coral = Colors.register(
924 RGB(255, 135, 135),
925 HSL(0, 100, 76),
926 'LightCoral',
927 210,
928 )
929 pale_violet_red1 = Colors.register(
930 RGB(255, 135, 175),
931 HSL(340, 100, 76),
932 'PaleVioletRed1',
933 211,
934 )
935 orchid2 = Colors.register(
936 RGB(255, 135, 215),
937 HSL(320, 100, 76),
938 'Orchid2',
939 212,
940 )
941 orchid1 = Colors.register(
942 RGB(255, 135, 255),
943 HSL(300, 100, 76),
944 'Orchid1',
945 213,
946 )
947 orange1 = Colors.register(RGB(255, 175, 0), HSL(1, 100, 50), 'Orange1', 214)
948 sandy_brown = Colors.register(
949 RGB(255, 175, 95),
950 HSL(30, 100, 68),
951 'SandyBrown',
952 215,
953 )
954 light_salmon1 = Colors.register(
955 RGB(255, 175, 135),
956 HSL(20, 100, 76),
957 'LightSalmon1',
958 216,
959 )
960 light_pink1 = Colors.register(
961 RGB(255, 175, 175),
962 HSL(0, 100, 84),
963 'LightPink1',
964 217,
965 )
966 pink1 = Colors.register(RGB(255, 175, 215), HSL(330, 100, 84), 'Pink1', 218)
967 plum1 = Colors.register(RGB(255, 175, 255), HSL(300, 100, 84), 'Plum1', 219)
968 gold1 = Colors.register(RGB(255, 215, 0), HSL(0, 100, 50), 'Gold1', 220)
969 light_goldenrod2 = Colors.register(
970 RGB(255, 215, 95),
971 HSL(45, 100, 68),
972 'LightGoldenrod2',
973 221,
974 )
975 light_goldenrod2 = Colors.register(
976 RGB(255, 215, 135),
977 HSL(40, 100, 76),
978 'LightGoldenrod2',
979 222,
980 )
981 navajo_white1 = Colors.register(
982 RGB(255, 215, 175),
983 HSL(30, 100, 84),
984 'NavajoWhite1',
985 223,
986 )
987 misty_rose1 = Colors.register(
988 RGB(255, 215, 215),
989 HSL(0, 100, 92),
990 'MistyRose1',
991 224,
992 )
993 thistle1 = Colors.register(
994 RGB(255, 215, 255),
995 HSL(300, 100, 92),
996 'Thistle1',
997 225,
998 )
999 yellow1 = Colors.register(RGB(255, 255, 0), HSL(60, 100, 50), 'Yellow1', 226)
1000 light_goldenrod1 = Colors.register(
1001 RGB(255, 255, 95),
1002 HSL(60, 100, 68),
1003 'LightGoldenrod1',
1004 227,
1005 )
1006 khaki1 = Colors.register(RGB(255, 255, 135), HSL(60, 100, 76), 'Khaki1', 228)
1007 wheat1 = Colors.register(RGB(255, 255, 175), HSL(60, 100, 84), 'Wheat1', 229)
1008 cornsilk1 = Colors.register(
1009 RGB(255, 255, 215),
1010 HSL(60, 100, 92),
1011 'Cornsilk1',
1012 230,
1013 )
1014 grey100 = Colors.register(RGB(255, 255, 255), HSL(0, 0, 100), 'Grey100', 231)
1015 grey3 = Colors.register(RGB(8, 8, 8), HSL(0, 0, 3), 'Grey3', 232)
1016 grey7 = Colors.register(RGB(18, 18, 18), HSL(0, 0, 7), 'Grey7', 233)
1017 grey11 = Colors.register(RGB(28, 28, 28), HSL(0, 0, 10), 'Grey11', 234)
1018 grey15 = Colors.register(RGB(38, 38, 38), HSL(0, 0, 14), 'Grey15', 235)
1019 grey19 = Colors.register(RGB(48, 48, 48), HSL(0, 0, 18), 'Grey19', 236)
1020 grey23 = Colors.register(RGB(58, 58, 58), HSL(0, 0, 22), 'Grey23', 237)
1021 grey27 = Colors.register(RGB(68, 68, 68), HSL(0, 0, 26), 'Grey27', 238)
1022 grey30 = Colors.register(RGB(78, 78, 78), HSL(0, 0, 30), 'Grey30', 239)
1023 grey35 = Colors.register(RGB(88, 88, 88), HSL(0, 0, 34), 'Grey35', 240)
1024 grey39 = Colors.register(RGB(98, 98, 98), HSL(0, 0, 37), 'Grey39', 241)
1025 grey42 = Colors.register(RGB(108, 108, 108), HSL(0, 0, 40), 'Grey42', 242)
1026 grey46 = Colors.register(RGB(118, 118, 118), HSL(0, 0, 46), 'Grey46', 243)
1027 grey50 = Colors.register(RGB(128, 128, 128), HSL(0, 0, 50), 'Grey50', 244)
1028 grey54 = Colors.register(RGB(138, 138, 138), HSL(0, 0, 54), 'Grey54', 245)
1029 grey58 = Colors.register(RGB(148, 148, 148), HSL(0, 0, 58), 'Grey58', 246)
1030 grey62 = Colors.register(RGB(158, 158, 158), HSL(0, 0, 61), 'Grey62', 247)
1031 grey66 = Colors.register(RGB(168, 168, 168), HSL(0, 0, 65), 'Grey66', 248)
1032 grey70 = Colors.register(RGB(178, 178, 178), HSL(0, 0, 69), 'Grey70', 249)
1033 grey74 = Colors.register(RGB(188, 188, 188), HSL(0, 0, 73), 'Grey74', 250)
1034 grey78 = Colors.register(RGB(198, 198, 198), HSL(0, 0, 77), 'Grey78', 251)
1035 grey82 = Colors.register(RGB(208, 208, 208), HSL(0, 0, 81), 'Grey82', 252)
1036 grey85 = Colors.register(RGB(218, 218, 218), HSL(0, 0, 85), 'Grey85', 253)
1037 grey89 = Colors.register(RGB(228, 228, 228), HSL(0, 0, 89), 'Grey89', 254)
1038 grey93 = Colors.register(RGB(238, 238, 238), HSL(0, 0, 93), 'Grey93', 255)
1039
1040 dark_gradient: ColorGradient = ColorGradient(
1041 red1,
1042 orange_red1,
1043 dark_orange,
1044 orange1,
1045 yellow1,
1046 yellow2,
1047 green_yellow,
1048 green1,
1049 )
1050 light_gradient: ColorGradient = ColorGradient(
1051 red1,
1052 orange_red1,
1053 dark_orange,
1054 orange1,
1055 gold3,
1056 dark_olive_green3,
1057 yellow4,
1058 green3,
1059 )
1060 bg_gradient: ColorGradient = ColorGradient(black)
1061
1062 # Check if the background is light or dark. This is by no means a foolproof
1063 # method, but there is no reliable way to detect this.
1064 _colorfgbg: list[str] = os.environ.get('COLORFGBG', '15;0').split(';')
1065 if _colorfgbg[-1] == str(white.xterm): # pragma: no cover
1066 # Light background
1067 gradient: ColorGradient = light_gradient
1068 primary = black
1069 else:
1070 # Default, expect a dark background
1071 gradient: ColorGradient = dark_gradient
1072 primary = white