The Pedigree Project  0.1
Xterm-colours.cc
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #include <stdint.h>
21 
22 uint32_t g_Colours[] = {
23  /*
24  0x000000,
25  0xB02222,
26  0x22B022,
27  0xB0B022,
28  0x2222B0,
29  0xB022B0,
30  0x22B0B0,
31  0xF0F0F0,
32  0xFFFFFF,
33  */
34 
35  0x000000, // 0
36  0x800000, 0x008000, 0x808000,
37  0x6495ed, // Cornflower Blue - much less dark! (was: 0x000080, )
38  0x800080, 0x008080,
39  0xc0c0c0, // 7
40  0x808080, 0xff0000, 0x00ff00, 0xffff00, 0x0000ff, 0xff00ff, 0x00ffff,
41  0xffffff, // 15
42 
43  // Begin 256-colour set
44  0x000000, // 16
45  0x00005F, 0x000087, 0x0000AF, 0x0000D7, 0x0000FF,
46  0x005F00, // 22
47  0x005F5F, 0x005F87, 0x005FAF, 0x005FD7, 0x005FFF,
48  0x008700, // 28
49  0x00875F, 0x008787, 0x0087AF, 0x0087D7, 0x0087FF,
50  0x00AF00, // 34
51  0x00AF5F, 0x00AF87, 0x00AFAF, 0x00AFD7, 0x00AFFF,
52  0x00D700, // 40
53  0x00D75F, 0x00D787, 0x00D7AF, 0x00D7D7, 0x00D7FF,
54  0x00FF00, // 46
55  0x00FF5F, 0x00FF87, 0x00FFAF, 0x00FFD7, 0x00FFFF,
56  0x5F0000, // 52
57  0x5F005F, 0x5F0087, 0x5F00AF, 0x5F00D7, 0x5F00FF,
58  0x5F5F00, // 58
59  0x5F5F5F, 0x5F5F87, 0x5F5FAF, 0x5F5FD7, 0x5F5FFF,
60  0x5F8700, // 64
61  0x5F875F, 0x5F8787, 0x5F87AF, 0x5F87D7, 0x5F87FF,
62  0x5FAF00, // 70
63  0x5FAF5F, 0x5FAF87, 0x5FAFAF, 0x5FAFD7, 0x5FAFFF,
64  0x5FD700, // 76
65  0x5FD75F, 0x5FD787, 0x5FD7AF, 0x5FD7D7, 0x5FD7FF,
66  0x5FFF00, // 82
67  0x5FFF5F, 0x5FFF87, 0x5FFFAF, 0x5FFFD7, 0x5FFFFF,
68  0x870000, // 88
69  0x87005F, 0x870087, 0x8700AF, 0x8700D7, 0x8700FF,
70  0x875F00, // 94
71  0x875F5F, 0x875F87, 0x875FAF, 0x875FD7, 0x875FFF,
72  0x878700, // 100
73  0x87875F, 0x878787, 0x8787AF, 0x8787D7, 0x8787FF,
74  0x87AF00, // 106
75  0x87AF5F, 0x87AF87, 0x87AFAF, 0x87AFD7, 0x87AFFF,
76  0x87D700, // 112
77  0x87D75F, 0x87D787, 0x87D7AF, 0x87D7D7, 0x87D7FF,
78  0x87FF00, // 118
79  0x87FF5F, 0x87FF87, 0x87FFAF, 0x87FFD7, 0x87FFFF,
80  0xAF0000, // 124
81  0xAF005F, 0xAF0087, 0xAF00AF, 0xAF00D7, 0xAF00FF,
82  0xAF5F00, // 130
83  0xAF5F5F, 0xAF5F87, 0xAF5FAF, 0xAF5FD7, 0xAF5FFF,
84  0xAF8700, // 136
85  0xAF875F, 0xAF8787, 0xAF87AF, 0xAF87D7, 0xAF87FF,
86  0xAFAF00, // 142
87  0xAFAF5F, 0xAFAF87, 0xAFAFAF, 0xAFAFD7, 0xAFAFFF,
88  0xAFD700, // 148
89  0xAFD75F, 0xAFD787, 0xAFD7AF, 0xAFD7D7, 0xAFD7FF,
90  0xAFFF00, // 154
91  0xAFFF5F, 0xAFFF87, 0xAFFFAF, 0xAFFFD7, 0xAFFFFF,
92  0xD70000, // 160
93  0xD7005F, 0xD70087, 0xD700AF, 0xD700D7, 0xD700FF,
94  0xD75F00, // 166
95  0xD75F5F, 0xD75F87, 0xD75FAF, 0xD75FD7, 0xD75FFF,
96  0xD78700, // 172
97  0xD7875F, 0xD78787, 0xD787AF, 0xD787D7, 0xD787FF,
98  0xDFAF00, // 178
99  0xDFAF5F, 0xDFAF87, 0xDFAFAF, 0xDFAFDF, 0xDFAFFF,
100  0xDFDF00, // 184
101  0xDFDF5F, 0xDFDF87, 0xDFDFAF, 0xDFDFDF, 0xDFDFFF,
102  0xDFFF00, // 190
103  0xDFFF5F, 0xDFFF87, 0xDFFFAF, 0xDFFFDF, 0xDFFFFF,
104  0xFF0000, // 196
105  0xFF005F, 0xFF0087, 0xFF00AF, 0xFF00DF, 0xFF00FF,
106  0xFF5F00, // 202
107  0xFF5F5F, 0xFF5F87, 0xFF5FAF, 0xFF5FDF, 0xFF5FFF,
108  0xFF8700, // 208
109  0xFF875F, 0xFF8787, 0xFF87AF, 0xFF87DF, 0xFF87FF,
110  0xFFAF00, // 214
111  0xFFAF5F, 0xFFAF87, 0xFFAFAF, 0xFFAFDF, 0xFFAFFF,
112  0xFFDF00, // 220
113  0xFFDF5F, 0xFFDF87, 0xFFDFAF, 0xFFDFDF, 0xFFDFFF,
114  0xFFFF00, // 226
115  0xFFFF5F, 0xFFFF87, 0xFFFFAF, 0xFFFFDF, 0xFFFFFF,
116 
117  // Greyscale
118  0x080808, // 232
119  0x121212, 0x1c1c1c, 0x262626, 0x303030, 0x3a3a3a, 0x444444, 0x4e4e4e,
120  0x585858, 0x626262, 0x6c6c6c, 0x767676,
121  0x808080, // 44
122  0x8a8a8a, 0x949494, 0x9e9e9e, 0xa8a8a8, 0xb2b2b2, 0xbcbcbc, 0xc6c6c6,
123  0xd0d0d0, 0xdadada, 0xe4e4e4,
124  0xeeeeee, // 255
125 };
126 
127 uint32_t g_BrightColours[] = {
128  0x333333, 0xFF3333, 0x33FF33, 0xFFFF33, 0x3333FF, 0xFF33FF, 0x33FFFF,
129  0xFFFFFF,
130 
131  // Begin 256-colour set (NOT ACTUALLY BRIGHT COLOURS)
132  0x000000, 0x00005F, 0x000087, 0x0000AF, 0x0000D7, 0x0000FF, 0x005F00,
133  0x005F5F, 0x005F87, 0x005FAF, 0x005FD7, 0x005FFF, 0x008700, 0x00875F,
134  0x008787, 0x0087AF, 0x0087D7, 0x0087FF, 0x00AF00, 0x00AF5F, 0x00AF87,
135  0x00AFAF, 0x00AFD7, 0x00AFFF, 0x00D700, 0x00D75F, 0x00D787, 0x00D7AF,
136  0x00D7D7, 0x00D7FF, 0x00FF00, 0x00FF5F, 0x00FF87, 0x00FFAF, 0x00FFD7,
137  0x00FFFF, 0x5FFF00, 0x5FFF5F, 0x5FFF87, 0x5FFFAF, 0x5FFFD7, 0x5FFFFF,
138  0x5FD700, 0x5FD75F, 0x5FD787, 0x5FD7AF, 0x5FD7D7, 0x5FD7FF, 0x5FAF00,
139  0x5FAF5F, 0x5FAF87, 0x5FAFAF, 0x5FAFD7, 0x5FAFFF, 0x5F8700, 0x5F875F,
140  0x5F8787, 0x5F87AF, 0x5F87D7, 0x5F87FF, 0x5F5F00, 0x5F5F5F, 0x5F5F87,
141  0x5F5FAF, 0x5F5FD7, 0x5F5FFF, 0x5F0000, 0x5F005F, 0x5F0087, 0x5F00AF,
142  0x5F00D7, 0x5F00FF, 0x8700FF, 0x8700D7, 0x8700AF, 0x870087, 0x87005F,
143  0x870000, 0x875FFF, 0x875FD7, 0x875FAF, 0x875F87, 0x875F5F, 0x875F00,
144  0x8787FF, 0x8787D7, 0x8787AF, 0x878787, 0x87875F, 0x878700, 0x87AFFF,
145  0x87AFD7, 0x87AFAF, 0x87AF87, 0x87AF5F, 0x87AF00, 0x87D7FF, 0x87D7D7,
146  0x87D7AF, 0x87D787, 0x87D75F, 0x87D700, 0x87FFFF, 0x87FFD7, 0x87FFAF,
147  0x87FF87, 0x87FF5F, 0x87FF00, 0xAFFFFF, 0xAFFFD7, 0xAFFFAF, 0xAFFF87,
148  0xAFFF5F, 0xAFFF00, 0xAFD7FF, 0xAFD7D7, 0xAFD7AF, 0xAFD787, 0xAFD75F,
149  0xAFD700, 0xAFAFFF, 0xAFAFD7, 0xAFAFAF, 0xAFAF87, 0xAFAF5F, 0xAFAF00,
150  0xAF87FF, 0xAF87D7, 0xAF87AF, 0xAF8787, 0xAF875F, 0xAF8700, 0xAF5FFF,
151  0xAF5FD7, 0xAF5FAF, 0xAF5F87, 0xAF5F5F, 0xAF5F00, 0xAF00FF, 0xAF00D7,
152  0xAF00AF, 0xAF0087, 0xAF005F, 0xAF0000, 0xD70000, 0xD7005F, 0xD70087,
153  0xD700AF, 0xD700D7, 0xD700FF, 0xD75F00, 0xD75F5F, 0xD75F87, 0xD75FAF,
154  0xD75FD7, 0xD75FFF, 0xD78700, 0xD7875F, 0xD78787, 0xD787AF, 0xD787D7,
155  0xD787FF, 0xDFAF00, 0xDFAF5F, 0xDFAF87, 0xDFAFAF, 0xDFAFDF, 0xDFAFFF,
156  0xDFDF00, 0xDFDF5F, 0xDFDF87, 0xDFDFAF, 0xDFDFDF, 0xDFDFFF, 0xDFFF00,
157  0xDFFF5F, 0xDFFF87, 0xDFFFAF, 0xDFFFDF, 0xDFFFFF, 0xFFFF00, 0xFFFF5F,
158  0xFFFF87, 0xFFFFAF, 0xFFFFDF, 0xFFFFFF, 0xFFDF00, 0xFFDF5F, 0xFFDF87,
159  0xFFDFAF, 0xFFDFDF, 0xFFDFFF, 0xFFAF00, 0xFFAF5F, 0xFFAF87, 0xFFAFAF,
160  0xFFAFDF, 0xFFAFFF, 0xFF8700, 0xFF875F, 0xFF8787, 0xFF87AF, 0xFF87DF,
161  0xFF87FF, 0xFF5F00, 0xFF5F5F, 0xFF5F87, 0xFF5FAF, 0xFF5FDF, 0xFF5FFF,
162  0xFF0000, 0xFF005F, 0xFF0087, 0xFF00AF, 0xFF00DF, 0xFF00FF};