libopencad
cadcolors.h
1 /*******************************************************************************
2  * Project: libopencad
3  * Purpose: OpenSource CAD formats support library
4  * Author: Alexandr Borzykh, mush3d at gmail.com
5  * Author: Dmitry Baryshnikov, bishop.dev@gmail.com
6  * Language: C++
7  *******************************************************************************
8  * The MIT License (MIT)
9  *
10  * Copyright (c) 2016 Alexandr Borzykh
11  * Copyright (c) 2016 NextGIS, <info@nextgis.com>
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a copy
14  * of this software and associated documentation files (the "Software"), to deal
15  * in the Software without restriction, including without limitation the rights
16  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17  * copies of the Software, and to permit persons to whom the Software is
18  * furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included in all
21  * copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29  * SOFTWARE.
30  *******************************************************************************/
31 #ifndef CADCOLORS_H
32 #define CADCOLORS_H
33 
34 typedef struct
35 {
36  unsigned char R;
37  unsigned char G;
38  unsigned char B;
39 } RGBColor;
40 
44 static const RGBColor CADACIColors[257]
45 {
46  {0,0,0}, // FIXME: ACI indexes counts from 0, but CMColor value never equals 0?
47  {0,0,0},
48  {255,0,0},
49  {255,255,0},
50  {0,255,0},
51  {0,255,255},
52  {0,0,255},
53  {255,0,255},
54  {255,255,255},
55  {65,65,65},
56  {128,128,128},
57  {255,0,0},
58  {255,170,170},
59  {189,0,0},
60  {189,126,126},
61  {129,0,0},
62  {129,86,86},
63  {104,0,0},
64  {104,69,69},
65  {79,0,0},
66  {79,53,53},
67  {255,63,0},
68  {255,191,170},
69  {189,46,0},
70  {189,141,126},
71  {129,31,0},
72  {129,96,86},
73  {104,25,0},
74  {104,78,69},
75  {79,19,0},
76  {79,59,53},
77  {255,127,0},
78  {255,212,170},
79  {189,94,0},
80  {189,157,126},
81  {129,64,0},
82  {129,107,86},
83  {104,52,0},
84  {104,86,69},
85  {79,39,0},
86  {79,66,53},
87  {255,191,0},
88  {255,234,170},
89  {189,141,0},
90  {189,173,126},
91  {129,96,0},
92  {129,118,86},
93  {104,78,0},
94  {104,95,69},
95  {79,59,0},
96  {79,73,53},
97  {255,255,0},
98  {255,255,170},
99  {189,189,0},
100  {189,189,126},
101  {129,129,0},
102  {129,129,86},
103  {104,104,0},
104  {104,104,69},
105  {79,79,0},
106  {79,79,53},
107  {191,255,0},
108  {234,255,170},
109  {141,189,0},
110  {173,189,126},
111  {96,129,0},
112  {118,129,86},
113  {78,104,0},
114  {95,104,69},
115  {59,79,0},
116  {73,79,53},
117  {127,255,0},
118  {212,255,170},
119  {94,189,0},
120  {157,189,126},
121  {64,129,0},
122  {107,129,86},
123  {52,104,0},
124  {86,104,69},
125  {39,79,0},
126  {66,79,53},
127  {63,255,0},
128  {191,255,170},
129  {46,189,0},
130  {141,189,126},
131  {31,129,0},
132  {96,129,86},
133  {25,104,0},
134  {78,104,69},
135  {19,79,0},
136  {59,79,53},
137  {0,255,0},
138  {170,255,170},
139  {0,189,0},
140  {126,189,126},
141  {0,129,0},
142  {86,129,86},
143  {0,104,0},
144  {69,104,69},
145  {0,79,0},
146  {53,79,53},
147  {0,255,63},
148  {170,255,191},
149  {0,189,46},
150  {126,189,141},
151  {0,129,31},
152  {86,129,96},
153  {0,104,25},
154  {69,104,78},
155  {0,79,19},
156  {53,79,59},
157  {0,255,127},
158  {170,255,212},
159  {0,189,94},
160  {126,189,157},
161  {0,129,64},
162  {86,129,107},
163  {0,104,52},
164  {69,104,86},
165  {0,79,39},
166  {53,79,66},
167  {0,255,191},
168  {170,255,234},
169  {0,189,141},
170  {126,189,173},
171  {0,129,96},
172  {86,129,118},
173  {0,104,78},
174  {69,104,95},
175  {0,79,59},
176  {53,79,73},
177  {0,255,255},
178  {170,255,255},
179  {0,189,189},
180  {126,189,189},
181  {0,129,129},
182  {86,129,129},
183  {0,104,104},
184  {69,104,104},
185  {0,79,79},
186  {53,79,79},
187  {0,191,255},
188  {170,234,255},
189  {0,141,189},
190  {126,173,189},
191  {0,96,129},
192  {86,118,129},
193  {0,78,104},
194  {69,95,104},
195  {0,59,79},
196  {53,73,79},
197  {0,127,255},
198  {170,212,255},
199  {0,94,189},
200  {126,157,189},
201  {0,64,129},
202  {86,107,129},
203  {0,52,104},
204  {69,86,104},
205  {0,39,79},
206  {53,66,79},
207  {0,63,255},
208  {170,191,255},
209  {0,46,189},
210  {126,141,189},
211  {0,31,129},
212  {86,96,129},
213  {0,25,104},
214  {69,78,104},
215  {0,19,79},
216  {53,59,79},
217  {0,0,255},
218  {170,170,255},
219  {0,0,189},
220  {126,126,189},
221  {0,0,129},
222  {86,86,129},
223  {0,0,104},
224  {69,69,104},
225  {0,0,79},
226  {53,53,79},
227  {63,0,255},
228  {191,170,255},
229  {46,0,189},
230  {141,126,189},
231  {31,0,129},
232  {96,86,129},
233  {25,0,104},
234  {78,69,104},
235  {19,0,79},
236  {59,53,79},
237  {127,0,255},
238  {212,170,255},
239  {94,0,189},
240  {157,126,189},
241  {64,0,129},
242  {107,86,129},
243  {52,0,104},
244  {86,69,104},
245  {39,0,79},
246  {66,53,79},
247  {191,0,255},
248  {234,170,255},
249  {141,0,189},
250  {173,126,189},
251  {96,0,129},
252  {118,86,129},
253  {78,0,104},
254  {95,69,104},
255  {59,0,79},
256  {73,53,79},
257  {255,0,255},
258  {255,170,255},
259  {189,0,189},
260  {189,126,189},
261  {129,0,129},
262  {129,86,129},
263  {104,0,104},
264  {104,69,104},
265  {79,0,79},
266  {79,53,79},
267  {255,0,191},
268  {255,170,234},
269  {189,0,141},
270  {189,126,173},
271  {129,0,96},
272  {129,86,118},
273  {104,0,78},
274  {104,69,95},
275  {79,0,59},
276  {79,53,73},
277  {255,0,127},
278  {255,170,212},
279  {189,0,94},
280  {189,126,157},
281  {129,0,64},
282  {129,86,107},
283  {104,0,52},
284  {104,69,86},
285  {79,0,39},
286  {79,53,66},
287  {255,0,63},
288  {255,170,191},
289  {189,0,46},
290  {189,126,141},
291  {129,0,31},
292  {129,86,96},
293  {104,0,25},
294  {104,69,78},
295  {79,0,19},
296  {79,53,59},
297  {51,51,51},
298  {80,80,80},
299  {105,105,105},
300  {130,130,130},
301  {190,190,190},
302  {255,255,255}
303 };
304 
305 #endif // CADCOLORS_H
Definition: cadcolors.h:34