comparison env/lib/python3.9/site-packages/coloredlogs/converter/colors.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 # Mapping of ANSI color codes to HTML/CSS colors.
2 #
3 # Author: Peter Odding <peter@peterodding.com>
4 # Last Change: January 14, 2018
5 # URL: https://coloredlogs.readthedocs.io
6
7 """Mapping of ANSI color codes to HTML/CSS colors."""
8
9 EIGHT_COLOR_PALETTE = (
10 '#010101', # black
11 '#DE382B', # red
12 '#39B54A', # green
13 '#FFC706', # yellow
14 '#006FB8', # blue
15 '#762671', # magenta
16 '#2CB5E9', # cyan
17 '#CCC', # white
18 )
19 """
20 A tuple of strings mapping basic color codes to CSS colors.
21
22 The items in this tuple correspond to the eight basic color codes for black,
23 red, green, yellow, blue, magenta, cyan and white as defined in the original
24 standard for ANSI escape sequences. The CSS colors are based on the `Ubuntu
25 color scheme`_ described on Wikipedia and they are encoded as hexadecimal
26 values to get the shortest strings, which reduces the size (in bytes) of
27 conversion output.
28
29 .. _Ubuntu color scheme: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
30 """
31
32 BRIGHT_COLOR_PALETTE = (
33 '#808080', # black
34 '#F00', # red
35 '#0F0', # green
36 '#FF0', # yellow
37 '#00F', # blue
38 '#F0F', # magenta
39 '#0FF', # cyan
40 '#FFF', # white
41 )
42 """
43 A tuple of strings mapping bright color codes to CSS colors.
44
45 This tuple maps the bright color variants of :data:`EIGHT_COLOR_PALETTE`.
46 """
47
48 EXTENDED_COLOR_PALETTE = (
49 '#000000',
50 '#800000',
51 '#008000',
52 '#808000',
53 '#000080',
54 '#800080',
55 '#008080',
56 '#C0C0C0',
57 '#808080',
58 '#FF0000',
59 '#00FF00',
60 '#FFFF00',
61 '#0000FF',
62 '#FF00FF',
63 '#00FFFF',
64 '#FFFFFF',
65 '#000000',
66 '#00005F',
67 '#000087',
68 '#0000AF',
69 '#0000D7',
70 '#0000FF',
71 '#005F00',
72 '#005F5F',
73 '#005F87',
74 '#005FAF',
75 '#005FD7',
76 '#005FFF',
77 '#008700',
78 '#00875F',
79 '#008787',
80 '#0087AF',
81 '#0087D7',
82 '#0087FF',
83 '#00AF00',
84 '#00AF5F',
85 '#00AF87',
86 '#00AFAF',
87 '#00AFD7',
88 '#00AFFF',
89 '#00D700',
90 '#00D75F',
91 '#00D787',
92 '#00D7AF',
93 '#00D7D7',
94 '#00D7FF',
95 '#00FF00',
96 '#00FF5F',
97 '#00FF87',
98 '#00FFAF',
99 '#00FFD7',
100 '#00FFFF',
101 '#5F0000',
102 '#5F005F',
103 '#5F0087',
104 '#5F00AF',
105 '#5F00D7',
106 '#5F00FF',
107 '#5F5F00',
108 '#5F5F5F',
109 '#5F5F87',
110 '#5F5FAF',
111 '#5F5FD7',
112 '#5F5FFF',
113 '#5F8700',
114 '#5F875F',
115 '#5F8787',
116 '#5F87AF',
117 '#5F87D7',
118 '#5F87FF',
119 '#5FAF00',
120 '#5FAF5F',
121 '#5FAF87',
122 '#5FAFAF',
123 '#5FAFD7',
124 '#5FAFFF',
125 '#5FD700',
126 '#5FD75F',
127 '#5FD787',
128 '#5FD7AF',
129 '#5FD7D7',
130 '#5FD7FF',
131 '#5FFF00',
132 '#5FFF5F',
133 '#5FFF87',
134 '#5FFFAF',
135 '#5FFFD7',
136 '#5FFFFF',
137 '#870000',
138 '#87005F',
139 '#870087',
140 '#8700AF',
141 '#8700D7',
142 '#8700FF',
143 '#875F00',
144 '#875F5F',
145 '#875F87',
146 '#875FAF',
147 '#875FD7',
148 '#875FFF',
149 '#878700',
150 '#87875F',
151 '#878787',
152 '#8787AF',
153 '#8787D7',
154 '#8787FF',
155 '#87AF00',
156 '#87AF5F',
157 '#87AF87',
158 '#87AFAF',
159 '#87AFD7',
160 '#87AFFF',
161 '#87D700',
162 '#87D75F',
163 '#87D787',
164 '#87D7AF',
165 '#87D7D7',
166 '#87D7FF',
167 '#87FF00',
168 '#87FF5F',
169 '#87FF87',
170 '#87FFAF',
171 '#87FFD7',
172 '#87FFFF',
173 '#AF0000',
174 '#AF005F',
175 '#AF0087',
176 '#AF00AF',
177 '#AF00D7',
178 '#AF00FF',
179 '#AF5F00',
180 '#AF5F5F',
181 '#AF5F87',
182 '#AF5FAF',
183 '#AF5FD7',
184 '#AF5FFF',
185 '#AF8700',
186 '#AF875F',
187 '#AF8787',
188 '#AF87AF',
189 '#AF87D7',
190 '#AF87FF',
191 '#AFAF00',
192 '#AFAF5F',
193 '#AFAF87',
194 '#AFAFAF',
195 '#AFAFD7',
196 '#AFAFFF',
197 '#AFD700',
198 '#AFD75F',
199 '#AFD787',
200 '#AFD7AF',
201 '#AFD7D7',
202 '#AFD7FF',
203 '#AFFF00',
204 '#AFFF5F',
205 '#AFFF87',
206 '#AFFFAF',
207 '#AFFFD7',
208 '#AFFFFF',
209 '#D70000',
210 '#D7005F',
211 '#D70087',
212 '#D700AF',
213 '#D700D7',
214 '#D700FF',
215 '#D75F00',
216 '#D75F5F',
217 '#D75F87',
218 '#D75FAF',
219 '#D75FD7',
220 '#D75FFF',
221 '#D78700',
222 '#D7875F',
223 '#D78787',
224 '#D787AF',
225 '#D787D7',
226 '#D787FF',
227 '#D7AF00',
228 '#D7AF5F',
229 '#D7AF87',
230 '#D7AFAF',
231 '#D7AFD7',
232 '#D7AFFF',
233 '#D7D700',
234 '#D7D75F',
235 '#D7D787',
236 '#D7D7AF',
237 '#D7D7D7',
238 '#D7D7FF',
239 '#D7FF00',
240 '#D7FF5F',
241 '#D7FF87',
242 '#D7FFAF',
243 '#D7FFD7',
244 '#D7FFFF',
245 '#FF0000',
246 '#FF005F',
247 '#FF0087',
248 '#FF00AF',
249 '#FF00D7',
250 '#FF00FF',
251 '#FF5F00',
252 '#FF5F5F',
253 '#FF5F87',
254 '#FF5FAF',
255 '#FF5FD7',
256 '#FF5FFF',
257 '#FF8700',
258 '#FF875F',
259 '#FF8787',
260 '#FF87AF',
261 '#FF87D7',
262 '#FF87FF',
263 '#FFAF00',
264 '#FFAF5F',
265 '#FFAF87',
266 '#FFAFAF',
267 '#FFAFD7',
268 '#FFAFFF',
269 '#FFD700',
270 '#FFD75F',
271 '#FFD787',
272 '#FFD7AF',
273 '#FFD7D7',
274 '#FFD7FF',
275 '#FFFF00',
276 '#FFFF5F',
277 '#FFFF87',
278 '#FFFFAF',
279 '#FFFFD7',
280 '#FFFFFF',
281 '#080808',
282 '#121212',
283 '#1C1C1C',
284 '#262626',
285 '#303030',
286 '#3A3A3A',
287 '#444444',
288 '#4E4E4E',
289 '#585858',
290 '#626262',
291 '#6C6C6C',
292 '#767676',
293 '#808080',
294 '#8A8A8A',
295 '#949494',
296 '#9E9E9E',
297 '#A8A8A8',
298 '#B2B2B2',
299 '#BCBCBC',
300 '#C6C6C6',
301 '#D0D0D0',
302 '#DADADA',
303 '#E4E4E4',
304 '#EEEEEE',
305 )
306 """
307 A tuple of strings mapping 256 color mode color codes to CSS colors.
308
309 The items in this tuple correspond to the color codes in the 256 color mode palette.
310 """