1 /* Terminal color palettes. */
2 /* TODO: We should probably autogenerate this using xterm's perl script. */
4 /* The 16 ANSI colors. */
5 static struct rgb palette16[] = {
41 {0x00, 0x00, 0x00}, /* 0 */
42 {0x80, 0x00, 0x00}, /* 1 */
43 {0x00, 0x80, 0x00}, /* 2 */
44 {0xaa, 0x55, 0x00}, /* 3 */
45 {0x00, 0x00, 0x80}, /* 4 */
46 {0x80, 0x00, 0x80}, /* 5 */
47 {0x00, 0x80, 0x80}, /* 6 */
48 {0xaa, 0xaa, 0xaa}, /* 7 */
49 {0x55, 0x55, 0x55}, /* 8 */
50 {0xff, 0x55, 0x55}, /* 9 */
51 {0x55, 0xff, 0x55}, /* 10 */
52 {0xff, 0xff, 0x55}, /* 11 */
53 {0x55, 0x55, 0xff}, /* 12 */
54 {0xff, 0x55, 0xff}, /* 13 */
55 {0x55, 0xff, 0xff}, /* 14 */
56 {0xff, 0xff, 0xff}, /* 15 */
60 #ifdef CONFIG_88_COLORS
61 /* Regexp'd from Dickey's xterm 88colres.h file. */
62 /* Colors 0-16 are the ANSI colors (and the same as palette16[]).
63 * Colors 16-79 are 4x4x4 color cubes
64 * Colors 80-91 are a grayscale ramp (with black and white left out). */
65 static struct rgb palette88[] = {
66 {0x00, 0x00, 0x00}, /* 0 */
67 {0x80, 0x00, 0x00}, /* 1 */
68 {0x00, 0x80, 0x00}, /* 2 */
69 {0xaa, 0x55, 0x00}, /* 3 */
70 {0x00, 0x00, 0x80}, /* 4 */
71 {0x80, 0x00, 0x80}, /* 5 */
72 {0x00, 0x80, 0x80}, /* 6 */
73 {0xaa, 0xaa, 0xaa}, /* 7 */
74 {0x55, 0x55, 0x55}, /* 8 */
75 {0xff, 0x55, 0x55}, /* 9 */
76 {0x55, 0xff, 0x55}, /* 10 */
77 {0xff, 0xff, 0x55}, /* 11 */
78 {0x55, 0x55, 0xff}, /* 12 */
79 {0xff, 0x55, 0xff}, /* 13 */
80 {0x55, 0xff, 0xff}, /* 14 */
81 {0xff, 0xff, 0xff}, /* 15 */
83 {0x00, 0x00, 0x00}, /* 16 */
84 {0x00, 0x00, 0x8b}, /* 17 */
85 {0x00, 0x00, 0xcd}, /* 18 */
86 {0x00, 0x00, 0xff}, /* 19 */
87 {0x00, 0x8b, 0x00}, /* 20 */
88 {0x00, 0x8b, 0x8b}, /* 21 */
89 {0x00, 0x8b, 0xcd}, /* 22 */
90 {0x00, 0x8b, 0xff}, /* 23 */
91 {0x00, 0xcd, 0x00}, /* 24 */
92 {0x00, 0xcd, 0x8b}, /* 25 */
93 {0x00, 0xcd, 0xcd}, /* 26 */
94 {0x00, 0xcd, 0xff}, /* 27 */
95 {0x00, 0xff, 0x00}, /* 28 */
96 {0x00, 0xff, 0x8b}, /* 29 */
97 {0x00, 0xff, 0xcd}, /* 30 */
98 {0x00, 0xff, 0xff}, /* 31 */
100 {0x8b, 0x00, 0x00}, /* 32 */
101 {0x8b, 0x00, 0x8b}, /* 33 */
102 {0x8b, 0x00, 0xcd}, /* 34 */
103 {0x8b, 0x00, 0xff}, /* 35 */
104 {0x8b, 0x8b, 0x00}, /* 36 */
105 {0x8b, 0x8b, 0x8b}, /* 37 */
106 {0x8b, 0x8b, 0xcd}, /* 38 */
107 {0x8b, 0x8b, 0xff}, /* 39 */
108 {0x8b, 0xcd, 0x00}, /* 40 */
109 {0x8b, 0xcd, 0x8b}, /* 41 */
110 {0x8b, 0xcd, 0xcd}, /* 42 */
111 {0x8b, 0xcd, 0xff}, /* 43 */
112 {0x8b, 0xff, 0x00}, /* 44 */
113 {0x8b, 0xff, 0x8b}, /* 45 */
114 {0x8b, 0xff, 0xcd}, /* 46 */
115 {0x8b, 0xff, 0xff}, /* 47 */
117 {0xcd, 0x00, 0x00}, /* 48 */
118 {0xcd, 0x00, 0x8b}, /* 49 */
119 {0xcd, 0x00, 0xcd}, /* 50 */
120 {0xcd, 0x00, 0xff}, /* 51 */
121 {0xcd, 0x8b, 0x00}, /* 52 */
122 {0xcd, 0x8b, 0x8b}, /* 53 */
123 {0xcd, 0x8b, 0xcd}, /* 54 */
124 {0xcd, 0x8b, 0xff}, /* 55 */
125 {0xcd, 0xcd, 0x00}, /* 56 */
126 {0xcd, 0xcd, 0x8b}, /* 57 */
127 {0xcd, 0xcd, 0xcd}, /* 58 */
128 {0xcd, 0xcd, 0xff}, /* 59 */
129 {0xcd, 0xff, 0x00}, /* 60 */
130 {0xcd, 0xff, 0x8b}, /* 61 */
131 {0xcd, 0xff, 0xcd}, /* 62 */
132 {0xcd, 0xff, 0xff}, /* 63 */
134 {0xff, 0x00, 0x00}, /* 64 */
135 {0xff, 0x00, 0x8b}, /* 65 */
136 {0xff, 0x00, 0xcd}, /* 66 */
137 {0xff, 0x00, 0xff}, /* 67 */
138 {0xff, 0x8b, 0x00}, /* 68 */
139 {0xff, 0x8b, 0x8b}, /* 69 */
140 {0xff, 0x8b, 0xcd}, /* 70 */
141 {0xff, 0x8b, 0xff}, /* 71 */
142 {0xff, 0xcd, 0x00}, /* 72 */
143 {0xff, 0xcd, 0x8b}, /* 73 */
144 {0xff, 0xcd, 0xcd}, /* 74 */
145 {0xff, 0xcd, 0xff}, /* 75 */
146 {0xff, 0xff, 0x00}, /* 76 */
147 {0xff, 0xff, 0x8b}, /* 77 */
148 {0xff, 0xff, 0xcd}, /* 78 */
149 {0xff, 0xff, 0xff}, /* 79 */
151 {0x2e, 0x2e, 0x2e}, /* 80 */
152 {0x5c, 0x5c, 0x5c}, /* 81 */
153 {0x73, 0x73, 0x73}, /* 82 */
154 {0x8b, 0x8b, 0x8b}, /* 83 */
155 {0xa2, 0xa2, 0xa2}, /* 84 */
156 {0xb9, 0xb9, 0xb9}, /* 85 */
157 {0xd0, 0xd0, 0xd0}, /* 86 */
158 {0xe7, 0xe7, 0xe7}, /* 87 */
162 #ifdef CONFIG_256_COLORS
163 /* Regexp'd from Dickey's xterm 256colres.h file. */
164 /* Colors 0- 16 are the ANSI colors (and the same as palette16[]).
165 * Colors 16-231 are a 6x6x6 color cube
166 * Colors 231-255 are a grayscale ramp (with black and white left out). */
167 static struct rgb palette256[] = {
168 {0x00, 0x00, 0x00}, /* 0 */
169 {0x80, 0x00, 0x00}, /* 1 */
170 {0x00, 0x80, 0x00}, /* 2 */
171 {0xaa, 0x55, 0x00}, /* 3 */
172 {0x00, 0x00, 0x80}, /* 4 */
173 {0x80, 0x00, 0x80}, /* 5 */
174 {0x00, 0x80, 0x80}, /* 6 */
175 {0xaa, 0xaa, 0xaa}, /* 7 */
176 {0x55, 0x55, 0x55}, /* 8 */
177 {0xff, 0x55, 0x55}, /* 9 */
178 {0x55, 0xff, 0x55}, /* 10 */
179 {0xff, 0xff, 0x55}, /* 11 */
180 {0x55, 0x55, 0xff}, /* 12 */
181 {0xff, 0x55, 0xff}, /* 13 */
182 {0x55, 0xff, 0xff}, /* 14 */
183 {0xff, 0xff, 0xff}, /* 15 */
185 {0x00, 0x00, 0x00}, /* 16 */
186 {0x00, 0x00, 0x5f}, /* 17 */
187 {0x00, 0x00, 0x87}, /* 18 */
188 {0x00, 0x00, 0xaf}, /* 19 */
189 {0x00, 0x00, 0xd7}, /* 20 */
190 {0x00, 0x00, 0xff}, /* 21 */
191 {0x00, 0x5f, 0x00}, /* 22 */
192 {0x00, 0x5f, 0x5f}, /* 23 */
193 {0x00, 0x5f, 0x87}, /* 24 */
194 {0x00, 0x5f, 0xaf}, /* 25 */
195 {0x00, 0x5f, 0xd7}, /* 26 */
196 {0x00, 0x5f, 0xff}, /* 27 */
197 {0x00, 0x87, 0x00}, /* 28 */
198 {0x00, 0x87, 0x5f}, /* 29 */
199 {0x00, 0x87, 0x87}, /* 30 */
200 {0x00, 0x87, 0xaf}, /* 31 */
201 {0x00, 0x87, 0xd7}, /* 32 */
202 {0x00, 0x87, 0xff}, /* 33 */
203 {0x00, 0xaf, 0x00}, /* 34 */
204 {0x00, 0xaf, 0x5f}, /* 35 */
205 {0x00, 0xaf, 0x87}, /* 36 */
206 {0x00, 0xaf, 0xaf}, /* 37 */
207 {0x00, 0xaf, 0xd7}, /* 38 */
208 {0x00, 0xaf, 0xff}, /* 39 */
209 {0x00, 0xd7, 0x00}, /* 40 */
210 {0x00, 0xd7, 0x5f}, /* 41 */
211 {0x00, 0xd7, 0x87}, /* 42 */
212 {0x00, 0xd7, 0xaf}, /* 43 */
213 {0x00, 0xd7, 0xd7}, /* 44 */
214 {0x00, 0xd7, 0xff}, /* 45 */
215 {0x00, 0xff, 0x00}, /* 46 */
216 {0x00, 0xff, 0x5f}, /* 47 */
217 {0x00, 0xff, 0x87}, /* 48 */
218 {0x00, 0xff, 0xaf}, /* 49 */
219 {0x00, 0xff, 0xd7}, /* 50 */
220 {0x00, 0xff, 0xff}, /* 51 */
222 {0x5f, 0x00, 0x00}, /* 52 */
223 {0x5f, 0x00, 0x5f}, /* 53 */
224 {0x5f, 0x00, 0x87}, /* 54 */
225 {0x5f, 0x00, 0xaf}, /* 55 */
226 {0x5f, 0x00, 0xd7}, /* 56 */
227 {0x5f, 0x00, 0xff}, /* 57 */
228 {0x5f, 0x5f, 0x00}, /* 58 */
229 {0x5f, 0x5f, 0x5f}, /* 59 */
230 {0x5f, 0x5f, 0x87}, /* 60 */
231 {0x5f, 0x5f, 0xaf}, /* 61 */
232 {0x5f, 0x5f, 0xd7}, /* 62 */
233 {0x5f, 0x5f, 0xff}, /* 63 */
234 {0x5f, 0x87, 0x00}, /* 64 */
235 {0x5f, 0x87, 0x5f}, /* 65 */
236 {0x5f, 0x87, 0x87}, /* 66 */
237 {0x5f, 0x87, 0xaf}, /* 67 */
238 {0x5f, 0x87, 0xd7}, /* 68 */
239 {0x5f, 0x87, 0xff}, /* 69 */
240 {0x5f, 0xaf, 0x00}, /* 70 */
241 {0x5f, 0xaf, 0x5f}, /* 71 */
242 {0x5f, 0xaf, 0x87}, /* 72 */
243 {0x5f, 0xaf, 0xaf}, /* 73 */
244 {0x5f, 0xaf, 0xd7}, /* 74 */
245 {0x5f, 0xaf, 0xff}, /* 75 */
246 {0x5f, 0xd7, 0x00}, /* 76 */
247 {0x5f, 0xd7, 0x5f}, /* 77 */
248 {0x5f, 0xd7, 0x87}, /* 78 */
249 {0x5f, 0xd7, 0xaf}, /* 79 */
250 {0x5f, 0xd7, 0xd7}, /* 80 */
251 {0x5f, 0xd7, 0xff}, /* 81 */
252 {0x5f, 0xff, 0x00}, /* 82 */
253 {0x5f, 0xff, 0x5f}, /* 83 */
254 {0x5f, 0xff, 0x87}, /* 84 */
255 {0x5f, 0xff, 0xaf}, /* 85 */
256 {0x5f, 0xff, 0xd7}, /* 86 */
257 {0x5f, 0xff, 0xff}, /* 87 */
259 {0x87, 0x00, 0x00}, /* 88 */
260 {0x87, 0x00, 0x5f}, /* 89 */
261 {0x87, 0x00, 0x87}, /* 90 */
262 {0x87, 0x00, 0xaf}, /* 91 */
263 {0x87, 0x00, 0xd7}, /* 92 */
264 {0x87, 0x00, 0xff}, /* 93 */
265 {0x87, 0x5f, 0x00}, /* 94 */
266 {0x87, 0x5f, 0x5f}, /* 95 */
267 {0x87, 0x5f, 0x87}, /* 96 */
268 {0x87, 0x5f, 0xaf}, /* 97 */
269 {0x87, 0x5f, 0xd7}, /* 98 */
270 {0x87, 0x5f, 0xff}, /* 99 */
271 {0x87, 0x87, 0x00}, /* 100 */
272 {0x87, 0x87, 0x5f}, /* 101 */
273 {0x87, 0x87, 0x87}, /* 102 */
274 {0x87, 0x87, 0xaf}, /* 103 */
275 {0x87, 0x87, 0xd7}, /* 104 */
276 {0x87, 0x87, 0xff}, /* 105 */
277 {0x87, 0xaf, 0x00}, /* 106 */
278 {0x87, 0xaf, 0x5f}, /* 107 */
279 {0x87, 0xaf, 0x87}, /* 108 */
280 {0x87, 0xaf, 0xaf}, /* 109 */
281 {0x87, 0xaf, 0xd7}, /* 110 */
282 {0x87, 0xaf, 0xff}, /* 111 */
283 {0x87, 0xd7, 0x00}, /* 112 */
284 {0x87, 0xd7, 0x5f}, /* 113 */
285 {0x87, 0xd7, 0x87}, /* 114 */
286 {0x87, 0xd7, 0xaf}, /* 115 */
287 {0x87, 0xd7, 0xd7}, /* 116 */
288 {0x87, 0xd7, 0xff}, /* 117 */
289 {0x87, 0xff, 0x00}, /* 118 */
290 {0x87, 0xff, 0x5f}, /* 119 */
291 {0x87, 0xff, 0x87}, /* 120 */
292 {0x87, 0xff, 0xaf}, /* 121 */
293 {0x87, 0xff, 0xd7}, /* 122 */
294 {0x87, 0xff, 0xff}, /* 123 */
296 {0xaf, 0x00, 0x00}, /* 124 */
297 {0xaf, 0x00, 0x5f}, /* 125 */
298 {0xaf, 0x00, 0x87}, /* 126 */
299 {0xaf, 0x00, 0xaf}, /* 127 */
300 {0xaf, 0x00, 0xd7}, /* 128 */
301 {0xaf, 0x00, 0xff}, /* 129 */
302 {0xaf, 0x5f, 0x00}, /* 130 */
303 {0xaf, 0x5f, 0x5f}, /* 131 */
304 {0xaf, 0x5f, 0x87}, /* 132 */
305 {0xaf, 0x5f, 0xaf}, /* 133 */
306 {0xaf, 0x5f, 0xd7}, /* 134 */
307 {0xaf, 0x5f, 0xff}, /* 135 */
308 {0xaf, 0x87, 0x00}, /* 136 */
309 {0xaf, 0x87, 0x5f}, /* 137 */
310 {0xaf, 0x87, 0x87}, /* 138 */
311 {0xaf, 0x87, 0xaf}, /* 139 */
312 {0xaf, 0x87, 0xd7}, /* 140 */
313 {0xaf, 0x87, 0xff}, /* 141 */
314 {0xaf, 0xaf, 0x00}, /* 142 */
315 {0xaf, 0xaf, 0x5f}, /* 143 */
316 {0xaf, 0xaf, 0x87}, /* 144 */
317 {0xaf, 0xaf, 0xaf}, /* 145 */
318 {0xaf, 0xaf, 0xd7}, /* 146 */
319 {0xaf, 0xaf, 0xff}, /* 147 */
320 {0xaf, 0xd7, 0x00}, /* 148 */
321 {0xaf, 0xd7, 0x5f}, /* 149 */
322 {0xaf, 0xd7, 0x87}, /* 150 */
323 {0xaf, 0xd7, 0xaf}, /* 151 */
324 {0xaf, 0xd7, 0xd7}, /* 152 */
325 {0xaf, 0xd7, 0xff}, /* 153 */
326 {0xaf, 0xff, 0x00}, /* 154 */
327 {0xaf, 0xff, 0x5f}, /* 155 */
328 {0xaf, 0xff, 0x87}, /* 156 */
329 {0xaf, 0xff, 0xaf}, /* 157 */
330 {0xaf, 0xff, 0xd7}, /* 158 */
331 {0xaf, 0xff, 0xff}, /* 159 */
333 {0xd7, 0x00, 0x00}, /* 160 */
334 {0xd7, 0x00, 0x5f}, /* 161 */
335 {0xd7, 0x00, 0x87}, /* 162 */
336 {0xd7, 0x00, 0xaf}, /* 163 */
337 {0xd7, 0x00, 0xd7}, /* 164 */
338 {0xd7, 0x00, 0xff}, /* 165 */
339 {0xd7, 0x5f, 0x00}, /* 166 */
340 {0xd7, 0x5f, 0x5f}, /* 167 */
341 {0xd7, 0x5f, 0x87}, /* 168 */
342 {0xd7, 0x5f, 0xaf}, /* 169 */
343 {0xd7, 0x5f, 0xd7}, /* 170 */
344 {0xd7, 0x5f, 0xff}, /* 171 */
345 {0xd7, 0x87, 0x00}, /* 172 */
346 {0xd7, 0x87, 0x5f}, /* 173 */
347 {0xd7, 0x87, 0x87}, /* 174 */
348 {0xd7, 0x87, 0xaf}, /* 175 */
349 {0xd7, 0x87, 0xd7}, /* 176 */
350 {0xd7, 0x87, 0xff}, /* 177 */
351 {0xd7, 0xaf, 0x00}, /* 178 */
352 {0xd7, 0xaf, 0x5f}, /* 179 */
353 {0xd7, 0xaf, 0x87}, /* 180 */
354 {0xd7, 0xaf, 0xaf}, /* 181 */
355 {0xd7, 0xaf, 0xd7}, /* 182 */
356 {0xd7, 0xaf, 0xff}, /* 183 */
357 {0xd7, 0xd7, 0x00}, /* 184 */
358 {0xd7, 0xd7, 0x5f}, /* 185 */
359 {0xd7, 0xd7, 0x87}, /* 186 */
360 {0xd7, 0xd7, 0xaf}, /* 187 */
361 {0xd7, 0xd7, 0xd7}, /* 188 */
362 {0xd7, 0xd7, 0xff}, /* 189 */
363 {0xd7, 0xff, 0x00}, /* 190 */
364 {0xd7, 0xff, 0x5f}, /* 191 */
365 {0xd7, 0xff, 0x87}, /* 192 */
366 {0xd7, 0xff, 0xaf}, /* 193 */
367 {0xd7, 0xff, 0xd7}, /* 194 */
368 {0xd7, 0xff, 0xff}, /* 195 */
370 {0xff, 0x00, 0x00}, /* 196 */
371 {0xff, 0x00, 0x5f}, /* 197 */
372 {0xff, 0x00, 0x87}, /* 198 */
373 {0xff, 0x00, 0xaf}, /* 199 */
374 {0xff, 0x00, 0xd7}, /* 200 */
375 {0xff, 0x00, 0xff}, /* 201 */
376 {0xff, 0x5f, 0x00}, /* 202 */
377 {0xff, 0x5f, 0x5f}, /* 203 */
378 {0xff, 0x5f, 0x87}, /* 204 */
379 {0xff, 0x5f, 0xaf}, /* 205 */
380 {0xff, 0x5f, 0xd7}, /* 206 */
381 {0xff, 0x5f, 0xff}, /* 207 */
382 {0xff, 0x87, 0x00}, /* 208 */
383 {0xff, 0x87, 0x5f}, /* 209 */
384 {0xff, 0x87, 0x87}, /* 210 */
385 {0xff, 0x87, 0xaf}, /* 211 */
386 {0xff, 0x87, 0xd7}, /* 212 */
387 {0xff, 0x87, 0xff}, /* 213 */
388 {0xff, 0xaf, 0x00}, /* 214 */
389 {0xff, 0xaf, 0x5f}, /* 215 */
390 {0xff, 0xaf, 0x87}, /* 216 */
391 {0xff, 0xaf, 0xaf}, /* 217 */
392 {0xff, 0xaf, 0xd7}, /* 218 */
393 {0xff, 0xaf, 0xff}, /* 219 */
394 {0xff, 0xd7, 0x00}, /* 220 */
395 {0xff, 0xd7, 0x5f}, /* 221 */
396 {0xff, 0xd7, 0x87}, /* 222 */
397 {0xff, 0xd7, 0xaf}, /* 223 */
398 {0xff, 0xd7, 0xd7}, /* 224 */
399 {0xff, 0xd7, 0xff}, /* 225 */
400 {0xff, 0xff, 0x00}, /* 226 */
401 {0xff, 0xff, 0x5f}, /* 227 */
402 {0xff, 0xff, 0x87}, /* 228 */
403 {0xff, 0xff, 0xaf}, /* 229 */
404 {0xff, 0xff, 0xd7}, /* 230 */
405 {0xff, 0xff, 0xff}, /* 231 */
407 {0x08, 0x08, 0x08}, /* 232 */
408 {0x12, 0x12, 0x12}, /* 233 */
409 {0x1c, 0x1c, 0x1c}, /* 234 */
410 {0x26, 0x26, 0x26}, /* 235 */
411 {0x30, 0x30, 0x30}, /* 236 */
412 {0x3a, 0x3a, 0x3a}, /* 237 */
413 {0x44, 0x44, 0x44}, /* 238 */
414 {0x4e, 0x4e, 0x4e}, /* 239 */
415 {0x58, 0x58, 0x58}, /* 240 */
416 {0x62, 0x62, 0x62}, /* 241 */
417 {0x6c, 0x6c, 0x6c}, /* 242 */
418 {0x76, 0x76, 0x76}, /* 243 */
419 {0x80, 0x80, 0x80}, /* 244 */
420 {0x8a, 0x8a, 0x8a}, /* 245 */
421 {0x94, 0x94, 0x94}, /* 246 */
422 {0x9e, 0x9e, 0x9e}, /* 247 */
423 {0xa8, 0xa8, 0xa8}, /* 248 */
424 {0xb2, 0xb2, 0xb2}, /* 249 */
425 {0xbc, 0xbc, 0xbc}, /* 250 */
426 {0xc6, 0xc6, 0xc6}, /* 251 */
427 {0xd0, 0xd0, 0xd0}, /* 252 */
428 {0xda, 0xda, 0xda}, /* 253 */
429 {0xe4, 0xe4, 0xe4}, /* 254 */
430 {0xee, 0xee, 0xee}, /* 255 */
434 /* vim: set filetype=c : */