omw  0.1.1
color.h
1 /*
2 author Oliver Blaser
3 date 17.09.2021
4 copyright MIT - Copyright (c) 2021 Oliver Blaser
5 */
6 
7 #ifndef IG_OMW_COLOR_H
8 #define IG_OMW_COLOR_H
9 
10 #include <cstdint>
11 
12 #include "../omw/string.h"
13 
14 namespace omw
15 {
20  class Color
21  {
22  public:
23  Color();
24  Color(int32_t rgb);
25  Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 0xFF);
26  Color(const std::string& css);
27  Color(const char* css);
28  virtual ~Color() {}
29 
30  bool isValid() const;
31  void validate(bool state = true);
32  void invalidate();
33 
34  void clear();
35  void opaque();
36  void transparent();
37 
38  void set(int32_t rgb);
39  void set(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 0xFF);
40  void set(const omw::Color& color);
41  void set(const std::string& css);
42  void set(const char* css);
43  void setARGB(int32_t argb);
44  void setR(uint8_t value);
45  void setG(uint8_t value);
46  void setB(uint8_t value);
47  void setA(uint8_t value);
48 
49  uint8_t r() const;
50  uint8_t g() const;
51  uint8_t b() const;
52  uint8_t a() const;
53  int32_t toRGB() const;
54  int32_t toARGB() const;
55 
56  omw::string toString() const;
57  omw::string toStringARGB() const;
58  omw::string toCssStr() const;
59 
60  omw::Color& operator+=(const omw::Color& operand);
61  friend omw::Color operator+(const omw::Color& lhs, const omw::Color& rhs);
62  friend bool operator==(const omw::Color& left, const omw::Color& right);
63  friend bool operator!=(const omw::Color& left, const omw::Color& right);
64 
67  void from_win(uint32_t winCol);
68  uint32_t to_win() const;
72  void from_wxW_RGB(uint32_t wxWCol);
73  void from_wxW_RGBA(uint32_t wxWCol);
74  uint32_t to_wxW_RGB() const;
75  uint32_t to_wxW_RGBA() const;
77 
78  private:
79  bool validity;
80  uint8_t rValue;
81  uint8_t gValue;
82  uint8_t bValue;
83  uint8_t aValue;
84  };
85 
86 
87 
88  int32_t alphaComposit(int32_t a_ACCC, int32_t b_ACCC);
89  omw::Color alphaComposit(const omw::Color& a, const omw::Color& b);
90  void alphaComposit_apply(int32_t a_ACCC, int32_t& b_ACCC);
91  void alphaComposit_apply(const omw::Color& a, omw::Color& b);
92 
93 
94 
95  omw::Color fromWinColor(uint32_t winCol);
96  omw::Color fromWxColor(uint32_t wxRGBA);
97 
98 
99 
101  namespace colors
102  {
103  constexpr int32_t transparent_argb = 0x00FFFFFF;
104  constexpr int32_t aliceBlue_argb = 0xFFF0F8FF;
105  constexpr int32_t antiqueWhite_argb = 0xFFFAEBD7;
106  constexpr int32_t aqua_argb = 0xFF00FFFF;
107  constexpr int32_t aquamarine_argb = 0xFF7FFFD4;
108  constexpr int32_t azure_argb = 0xFFF0FFFF;
109  constexpr int32_t beige_argb = 0xFFF5F5DC;
110  constexpr int32_t bisque_argb = 0xFFFFE4C4;
111  constexpr int32_t black_argb = 0xFF000000;
112  constexpr int32_t blanchedAlmond_argb = 0xFFFFEBCD;
113  constexpr int32_t blue_argb = 0xFF0000FF;
114  constexpr int32_t blueViolet_argb = 0xFF8A2BE2;
115  constexpr int32_t brown_argb = 0xFFA52A2A;
116  constexpr int32_t burlyWood_argb = 0xFFDEB887;
117  constexpr int32_t cadetBlue_argb = 0xFF5F9EA0;
118  constexpr int32_t chartreuse_argb = 0xFF7FFF00;
119  constexpr int32_t chocolate_argb = 0xFFD2691E;
120  constexpr int32_t coral_argb = 0xFFFF7F50;
121  constexpr int32_t cornflowerBlue_argb = 0xFF6495ED;
122  constexpr int32_t cornsilk_argb = 0xFFFFF8DC;
123  constexpr int32_t crimson_argb = 0xFFDC143C;
124  constexpr int32_t cyan_argb = 0xFF00FFFF;
125  constexpr int32_t darkBlue_argb = 0xFF00008B;
126  constexpr int32_t darkCyan_argb = 0xFF008B8B;
127  constexpr int32_t darkGoldenrod_argb = 0xFFB8860B;
128  constexpr int32_t darkGray_argb = 0xFFA9A9A9;
129  constexpr int32_t darkGreen_argb = 0xFF006400;
130  constexpr int32_t darkKhaki_argb = 0xFFBDB76B;
131  constexpr int32_t darkMagenta_argb = 0xFF8B008B;
132  constexpr int32_t darkOliveGreen_argb = 0xFF556B2F;
133  constexpr int32_t darkOrange_argb = 0xFFFF8C00;
134  constexpr int32_t darkOrchid_argb = 0xFF9932CC;
135  constexpr int32_t darkRed_argb = 0xFF8B0000;
136  constexpr int32_t darkSalmon_argb = 0xFFE9967A;
137  constexpr int32_t darkSeaGreen_argb = 0xFF8FBC8F;
138  constexpr int32_t darkSlateBlue_argb = 0xFF483D8B;
139  constexpr int32_t darkSlateGray_argb = 0xFF2F4F4F;
140  constexpr int32_t darkTurquoise_argb = 0xFF00CED1;
141  constexpr int32_t darkViolet_argb = 0xFF9400D3;
142  constexpr int32_t deepPink_argb = 0xFFFF1493;
143  constexpr int32_t deepSkyBlue_argb = 0xFF00BFFF;
144  constexpr int32_t dimGray_argb = 0xFF696969;
145  constexpr int32_t dodgerBlue_argb = 0xFF1E90FF;
146  constexpr int32_t firebrick_argb = 0xFFB22222;
147  constexpr int32_t floralWhite_argb = 0xFFFFFAF0;
148  constexpr int32_t forestGreen_argb = 0xFF228B22;
149  constexpr int32_t fuchsia_argb = 0xFFFF00FF;
150  constexpr int32_t gainsboro_argb = 0xFFDCDCDC;
151  constexpr int32_t ghostWhite_argb = 0xFFF8F8FF;
152  constexpr int32_t gold_argb = 0xFFFFD700;
153  constexpr int32_t goldenrod_argb = 0xFFDAA520;
154  constexpr int32_t gray_argb = 0xFF808080;
155  constexpr int32_t green_argb = 0xFF008000;
156  constexpr int32_t greenYellow_argb = 0xFFADFF2F;
157  constexpr int32_t honeydew_argb = 0xFFF0FFF0;
158  constexpr int32_t hotPink_argb = 0xFFFF69B4;
159  constexpr int32_t indianRed_argb = 0xFFCD5C5C;
160  constexpr int32_t indigo_argb = 0xFF4B0082;
161  constexpr int32_t ivory_argb = 0xFFFFFFF0;
162  constexpr int32_t khaki_argb = 0xFFF0E68C;
163  constexpr int32_t lavender_argb = 0xFFE6E6FA;
164  constexpr int32_t lavenderBlush_argb = 0xFFFFF0F5;
165  constexpr int32_t lawnGreen_argb = 0xFF7CFC00;
166  constexpr int32_t lemonChiffon_argb = 0xFFFFFACD;
167  constexpr int32_t lightBlue_argb = 0xFFADD8E6;
168  constexpr int32_t lightCoral_argb = 0xFFF08080;
169  constexpr int32_t lightCyan_argb = 0xFFE0FFFF;
170  constexpr int32_t lightGoldenrodYellow_argb = 0xFFFAFAD2;
171  constexpr int32_t lightGray_argb = 0xFFD3D3D3;
172  constexpr int32_t lightGreen_argb = 0xFF90EE90;
173  constexpr int32_t lightPink_argb = 0xFFFFB6C1;
174  constexpr int32_t lightSalmon_argb = 0xFFFFA07A;
175  constexpr int32_t lightSeaGreen_argb = 0xFF20B2AA;
176  constexpr int32_t lightSkyBlue_argb = 0xFF87CEFA;
177  constexpr int32_t lightSlateGray_argb = 0xFF778899;
178  constexpr int32_t lightSteelBlue_argb = 0xFFB0C4DE;
179  constexpr int32_t lightYellow_argb = 0xFFFFFFE0;
180  constexpr int32_t lime_argb = 0xFF00FF00;
181  constexpr int32_t limeGreen_argb = 0xFF32CD32;
182  constexpr int32_t linen_argb = 0xFFFAF0E6;
183  constexpr int32_t magenta_argb = 0xFFFF00FF;
184  constexpr int32_t maroon_argb = 0xFF800000;
185  constexpr int32_t mediumAquamarine_argb = 0xFF66CDAA;
186  constexpr int32_t mediumBlue_argb = 0xFF0000CD;
187  constexpr int32_t mediumOrchid_argb = 0xFFBA55D3;
188  constexpr int32_t mediumPurple_argb = 0xFF9370DB;
189  constexpr int32_t mediumSeaGreen_argb = 0xFF3CB371;
190  constexpr int32_t mediumSlateBlue_argb = 0xFF7B68EE;
191  constexpr int32_t mediumSpringGreen_argb = 0xFF00FA9A;
192  constexpr int32_t mediumTurquoise_argb = 0xFF48D1CC;
193  constexpr int32_t mediumVioletRed_argb = 0xFFC71585;
194  constexpr int32_t midnightBlue_argb = 0xFF191970;
195  constexpr int32_t mintCream_argb = 0xFFF5FFFA;
196  constexpr int32_t mistyRose_argb = 0xFFFFE4E1;
197  constexpr int32_t moccasin_argb = 0xFFFFE4B5;
198  constexpr int32_t navajoWhite_argb = 0xFFFFDEAD;
199  constexpr int32_t navy_argb = 0xFF000080;
200  constexpr int32_t oldLace_argb = 0xFFFDF5E6;
201  constexpr int32_t olive_argb = 0xFF808000;
202  constexpr int32_t oliveDrab_argb = 0xFF6B8E23;
203  constexpr int32_t orange_argb = 0xFFFFA500;
204  constexpr int32_t orangeRed_argb = 0xFFFF4500;
205  constexpr int32_t orchid_argb = 0xFFDA70D6;
206  constexpr int32_t paleGoldenrod_argb = 0xFFEEE8AA;
207  constexpr int32_t paleGreen_argb = 0xFF98FB98;
208  constexpr int32_t paleTurquoise_argb = 0xFFAFEEEE;
209  constexpr int32_t paleVioletRed_argb = 0xFFDB7093;
210  constexpr int32_t papayaWhip_argb = 0xFFFFEFD5;
211  constexpr int32_t peachPuff_argb = 0xFFFFDAB9;
212  constexpr int32_t peru_argb = 0xFFCD853F;
213  constexpr int32_t pink_argb = 0xFFFFC0CB;
214  constexpr int32_t plum_argb = 0xFFDDA0DD;
215  constexpr int32_t powderBlue_argb = 0xFFB0E0E6;
216  constexpr int32_t purple_argb = 0xFF800080;
217  constexpr int32_t red_argb = 0xFFFF0000;
218  constexpr int32_t rosyBrown_argb = 0xFFBC8F8F;
219  constexpr int32_t royalBlue_argb = 0xFF4169E1;
220  constexpr int32_t saddleBrown_argb = 0xFF8B4513;
221  constexpr int32_t salmon_argb = 0xFFFA8072;
222  constexpr int32_t sandyBrown_argb = 0xFFF4A460;
223  constexpr int32_t seaGreen_argb = 0xFF2E8B57;
224  constexpr int32_t seaShell_argb = 0xFFFFF5EE;
225  constexpr int32_t sienna_argb = 0xFFA0522D;
226  constexpr int32_t silver_argb = 0xFFC0C0C0;
227  constexpr int32_t skyBlue_argb = 0xFF87CEEB;
228  constexpr int32_t slateBlue_argb = 0xFF6A5ACD;
229  constexpr int32_t slateGray_argb = 0xFF708090;
230  constexpr int32_t snow_argb = 0xFFFFFAFA;
231  constexpr int32_t springGreen_argb = 0xFF00FF7F;
232  constexpr int32_t steelBlue_argb = 0xFF4682B4;
233  constexpr int32_t tan_argb = 0xFFD2B48C;
234  constexpr int32_t teal_argb = 0xFF008080;
235  constexpr int32_t thistle_argb = 0xFFD8BFD8;
236  constexpr int32_t tomato_argb = 0xFFFF6347;
237  constexpr int32_t turquoise_argb = 0xFF40E0D0;
238  constexpr int32_t violet_argb = 0xFFEE82EE;
239  constexpr int32_t wheat_argb = 0xFFF5DEB3;
240  constexpr int32_t white_argb = 0xFFFFFFFF;
241  constexpr int32_t whiteSmoke_argb = 0xFFF5F5F5;
242  constexpr int32_t yellow_argb = 0xFFFFFF00;
243  constexpr int32_t yellowGreen_argb = 0xFF9ACD32;
244 
245  const omw::Color transparent = omw::Color(255, 255, 255, 0);
246  const omw::Color aliceBlue = omw::Color(aliceBlue_argb);
247  const omw::Color antiqueWhite = omw::Color(antiqueWhite_argb);
248  const omw::Color aqua = omw::Color(aqua_argb);
249  const omw::Color aquamarine = omw::Color(aquamarine_argb);
250  const omw::Color azure = omw::Color(azure_argb);
251  const omw::Color beige = omw::Color(beige_argb);
252  const omw::Color bisque = omw::Color(bisque_argb);
253  const omw::Color black = omw::Color(black_argb);
254  const omw::Color blanchedAlmond = omw::Color(blanchedAlmond_argb);
255  const omw::Color blue = omw::Color(blue_argb);
256  const omw::Color blueViolet = omw::Color(blueViolet_argb);
257  const omw::Color brown = omw::Color(brown_argb);
258  const omw::Color burlyWood = omw::Color(burlyWood_argb);
259  const omw::Color cadetBlue = omw::Color(cadetBlue_argb);
260  const omw::Color chartreuse = omw::Color(chartreuse_argb);
261  const omw::Color chocolate = omw::Color(chocolate_argb);
262  const omw::Color coral = omw::Color(coral_argb);
263  const omw::Color cornflowerBlue = omw::Color(cornflowerBlue_argb);
264  const omw::Color cornsilk = omw::Color(cornsilk_argb);
265  const omw::Color crimson = omw::Color(crimson_argb);
266  const omw::Color cyan = omw::Color(cyan_argb);
267  const omw::Color darkBlue = omw::Color(darkBlue_argb);
268  const omw::Color darkCyan = omw::Color(darkCyan_argb);
269  const omw::Color darkGoldenrod = omw::Color(darkGoldenrod_argb);
270  const omw::Color darkGray = omw::Color(darkGray_argb);
271  const omw::Color darkGreen = omw::Color(darkGreen_argb);
272  const omw::Color darkKhaki = omw::Color(darkKhaki_argb);
273  const omw::Color darkMagenta = omw::Color(darkMagenta_argb);
274  const omw::Color darkOliveGreen = omw::Color(darkOliveGreen_argb);
275  const omw::Color darkOrange = omw::Color(darkOrange_argb);
276  const omw::Color darkOrchid = omw::Color(darkOrchid_argb);
277  const omw::Color darkRed = omw::Color(darkRed_argb);
278  const omw::Color darkSalmon = omw::Color(darkSalmon_argb);
279  const omw::Color darkSeaGreen = omw::Color(darkSeaGreen_argb);
280  const omw::Color darkSlateBlue = omw::Color(darkSlateBlue_argb);
281  const omw::Color darkSlateGray = omw::Color(darkSlateGray_argb);
282  const omw::Color darkTurquoise = omw::Color(darkTurquoise_argb);
283  const omw::Color darkViolet = omw::Color(darkViolet_argb);
284  const omw::Color deepPink = omw::Color(deepPink_argb);
285  const omw::Color deepSkyBlue = omw::Color(deepSkyBlue_argb);
286  const omw::Color dimGray = omw::Color(dimGray_argb);
287  const omw::Color dodgerBlue = omw::Color(dodgerBlue_argb);
288  const omw::Color firebrick = omw::Color(firebrick_argb);
289  const omw::Color floralWhite = omw::Color(floralWhite_argb);
290  const omw::Color forestGreen = omw::Color(forestGreen_argb);
291  const omw::Color fuchsia = omw::Color(fuchsia_argb);
292  const omw::Color gainsboro = omw::Color(gainsboro_argb);
293  const omw::Color ghostWhite = omw::Color(ghostWhite_argb);
294  const omw::Color gold = omw::Color(gold_argb);
295  const omw::Color goldenrod = omw::Color(goldenrod_argb);
296  const omw::Color gray = omw::Color(gray_argb);
297  const omw::Color green = omw::Color(green_argb);
298  const omw::Color greenYellow = omw::Color(greenYellow_argb);
299  const omw::Color honeydew = omw::Color(honeydew_argb);
300  const omw::Color hotPink = omw::Color(hotPink_argb);
301  const omw::Color indianRed = omw::Color(indianRed_argb);
302  const omw::Color indigo = omw::Color(indigo_argb);
303  const omw::Color ivory = omw::Color(ivory_argb);
304  const omw::Color khaki = omw::Color(khaki_argb);
305  const omw::Color lavender = omw::Color(lavender_argb);
306  const omw::Color lavenderBlush = omw::Color(lavenderBlush_argb);
307  const omw::Color lawnGreen = omw::Color(lawnGreen_argb);
308  const omw::Color lemonChiffon = omw::Color(lemonChiffon_argb);
309  const omw::Color lightBlue = omw::Color(lightBlue_argb);
310  const omw::Color lightCoral = omw::Color(lightCoral_argb);
311  const omw::Color lightCyan = omw::Color(lightCyan_argb);
312  const omw::Color lightGoldenrodYellow = omw::Color(lightGoldenrodYellow_argb);
313  const omw::Color lightGray = omw::Color(lightGray_argb);
314  const omw::Color lightGreen = omw::Color(lightGreen_argb);
315  const omw::Color lightPink = omw::Color(lightPink_argb);
316  const omw::Color lightSalmon = omw::Color(lightSalmon_argb);
317  const omw::Color lightSeaGreen = omw::Color(lightSeaGreen_argb);
318  const omw::Color lightSkyBlue = omw::Color(lightSkyBlue_argb);
319  const omw::Color lightSlateGray = omw::Color(lightSlateGray_argb);
320  const omw::Color lightSteelBlue = omw::Color(lightSteelBlue_argb);
321  const omw::Color lightYellow = omw::Color(lightYellow_argb);
322  const omw::Color lime = omw::Color(lime_argb);
323  const omw::Color limeGreen = omw::Color(limeGreen_argb);
324  const omw::Color linen = omw::Color(linen_argb);
325  const omw::Color magenta = omw::Color(magenta_argb);
326  const omw::Color maroon = omw::Color(maroon_argb);
327  const omw::Color mediumAquamarine = omw::Color(mediumAquamarine_argb);
328  const omw::Color mediumBlue = omw::Color(mediumBlue_argb);
329  const omw::Color mediumOrchid = omw::Color(mediumOrchid_argb);
330  const omw::Color mediumPurple = omw::Color(mediumPurple_argb);
331  const omw::Color mediumSeaGreen = omw::Color(mediumSeaGreen_argb);
332  const omw::Color mediumSlateBlue = omw::Color(mediumSlateBlue_argb);
333  const omw::Color mediumSpringGreen = omw::Color(mediumSpringGreen_argb);
334  const omw::Color mediumTurquoise = omw::Color(mediumTurquoise_argb);
335  const omw::Color mediumVioletRed = omw::Color(mediumVioletRed_argb);
336  const omw::Color midnightBlue = omw::Color(midnightBlue_argb);
337  const omw::Color mintCream = omw::Color(mintCream_argb);
338  const omw::Color mistyRose = omw::Color(mistyRose_argb);
339  const omw::Color moccasin = omw::Color(moccasin_argb);
340  const omw::Color navajoWhite = omw::Color(navajoWhite_argb);
341  const omw::Color navy = omw::Color(navy_argb);
342  const omw::Color oldLace = omw::Color(oldLace_argb);
343  const omw::Color olive = omw::Color(olive_argb);
344  const omw::Color oliveDrab = omw::Color(oliveDrab_argb);
345  const omw::Color orange = omw::Color(orange_argb);
346  const omw::Color orangeRed = omw::Color(orangeRed_argb);
347  const omw::Color orchid = omw::Color(orchid_argb);
348  const omw::Color paleGoldenrod = omw::Color(paleGoldenrod_argb);
349  const omw::Color paleGreen = omw::Color(paleGreen_argb);
350  const omw::Color paleTurquoise = omw::Color(paleTurquoise_argb);
351  const omw::Color paleVioletRed = omw::Color(paleVioletRed_argb);
352  const omw::Color papayaWhip = omw::Color(papayaWhip_argb);
353  const omw::Color peachPuff = omw::Color(peachPuff_argb);
354  const omw::Color peru = omw::Color(peru_argb);
355  const omw::Color pink = omw::Color(pink_argb);
356  const omw::Color plum = omw::Color(plum_argb);
357  const omw::Color powderBlue = omw::Color(powderBlue_argb);
358  const omw::Color purple = omw::Color(purple_argb);
359  const omw::Color red = omw::Color(red_argb);
360  const omw::Color rosyBrown = omw::Color(rosyBrown_argb);
361  const omw::Color royalBlue = omw::Color(royalBlue_argb);
362  const omw::Color saddleBrown = omw::Color(saddleBrown_argb);
363  const omw::Color salmon = omw::Color(salmon_argb);
364  const omw::Color sandyBrown = omw::Color(sandyBrown_argb);
365  const omw::Color seaGreen = omw::Color(seaGreen_argb);
366  const omw::Color seaShell = omw::Color(seaShell_argb);
367  const omw::Color sienna = omw::Color(sienna_argb);
368  const omw::Color silver = omw::Color(silver_argb);
369  const omw::Color skyBlue = omw::Color(skyBlue_argb);
370  const omw::Color slateBlue = omw::Color(slateBlue_argb);
371  const omw::Color slateGray = omw::Color(slateGray_argb);
372  const omw::Color snow = omw::Color(snow_argb);
373  const omw::Color springGreen = omw::Color(springGreen_argb);
374  const omw::Color steelBlue = omw::Color(steelBlue_argb);
375  const omw::Color tan = omw::Color(tan_argb);
376  const omw::Color teal = omw::Color(teal_argb);
377  const omw::Color thistle = omw::Color(thistle_argb);
378  const omw::Color tomato = omw::Color(tomato_argb);
379  const omw::Color turquoise = omw::Color(turquoise_argb);
380  const omw::Color violet = omw::Color(violet_argb);
381  const omw::Color wheat = omw::Color(wheat_argb);
382  const omw::Color white = omw::Color(white_argb);
383  const omw::Color whiteSmoke = omw::Color(whiteSmoke_argb);
384  const omw::Color yellow = omw::Color(yellow_argb);
385  const omw::Color yellowGreen = omw::Color(yellowGreen_argb);
386 
391  namespace windows
392  {
393  constexpr int32_t activeBorder_argb = 0xFFB4B4B4;
394  constexpr int32_t activeCaption_argb = 0xFF99B4D1;
395  constexpr int32_t activeCaptionText_argb = 0xFF000000;
396  constexpr int32_t appWorkspace_argb = 0xFFABABAB;
397  constexpr int32_t buttonFace_argb = 0xFFF0F0F0;
398  constexpr int32_t buttonHighlight_argb = 0xFFFFFFFF;
399  constexpr int32_t buttonShadow_argb = 0xFFA0A0A0;
400  constexpr int32_t control_argb = 0xFFF0F0F0;
401  constexpr int32_t controlDark_argb = 0xFFA0A0A0;
402  constexpr int32_t controlDarkDark_argb = 0xFF696969;
403  constexpr int32_t controlLight_argb = 0xFFE3E3E3;
404  constexpr int32_t controlLightLight_argb = 0xFFFFFFFF;
405  constexpr int32_t controlText_argb = 0xFF000000;
406  constexpr int32_t desktop_argb = 0xFF000000;
407  constexpr int32_t gradientActiveCaption_argb = 0xFFB9D1EA;
408  constexpr int32_t gradientInactiveCaption_argb = 0xFFD7E4F2;
409  constexpr int32_t grayText_argb = 0xFF6D6D6D;
410  constexpr int32_t highlight_argb = 0xFF0078D7;
411  constexpr int32_t highlightText_argb = 0xFFFFFFFF;
412  constexpr int32_t hotTrack_argb = 0xFF0066CC;
413  constexpr int32_t inactiveBorder_argb = 0xFFF4F7FC;
414  constexpr int32_t inactiveCaption_argb = 0xFFBFCDDB;
415  constexpr int32_t inactiveCaptionText_argb = 0xFF000000;
416  constexpr int32_t info_argb = 0xFFFFFFE1;
417  constexpr int32_t infoText_argb = 0xFF000000;
418  constexpr int32_t menu_argb = 0xFFF0F0F0;
419  constexpr int32_t menuBar_argb = 0xFFF0F0F0;
420  constexpr int32_t menuHighlight_argb = 0xFF0078D7;
421  constexpr int32_t menuText_argb = 0xFF000000;
422  constexpr int32_t scrollBar_argb = 0xFFC8C8C8;
423  constexpr int32_t window_argb = 0xFFFFFFFF;
424  constexpr int32_t windowFrame_argb = 0xFF646464;
425  constexpr int32_t windowText_argb = 0xFF000000;
426 
427  const omw::Color activeBorder = omw::Color(activeBorder_argb);
428  const omw::Color activeCaption = omw::Color(activeCaption_argb);
429  const omw::Color activeCaptionText = omw::Color(activeCaptionText_argb);
430  const omw::Color appWorkspace = omw::Color(appWorkspace_argb);
431  const omw::Color buttonFace = omw::Color(buttonFace_argb);
432  const omw::Color buttonHighlight = omw::Color(buttonHighlight_argb);
433  const omw::Color buttonShadow = omw::Color(buttonShadow_argb);
434  const omw::Color control = omw::Color(control_argb);
435  const omw::Color controlDark = omw::Color(controlDark_argb);
436  const omw::Color controlDarkDark = omw::Color(controlDarkDark_argb);
437  const omw::Color controlLight = omw::Color(controlLight_argb);
438  const omw::Color controlLightLight = omw::Color(controlLightLight_argb);
439  const omw::Color controlText = omw::Color(controlText_argb);
440  const omw::Color desktop = omw::Color(desktop_argb);
441  const omw::Color gradientActiveCaption = omw::Color(gradientActiveCaption_argb);
442  const omw::Color gradientInactiveCaption = omw::Color(gradientInactiveCaption_argb);
443  const omw::Color grayText = omw::Color(grayText_argb);
444  const omw::Color highlight = omw::Color(highlight_argb);
445  const omw::Color highlightText = omw::Color(highlightText_argb);
446  const omw::Color hotTrack = omw::Color(hotTrack_argb);
447  const omw::Color inactiveBorder = omw::Color(inactiveBorder_argb);
448  const omw::Color inactiveCaption = omw::Color(inactiveCaption_argb);
449  const omw::Color inactiveCaptionText = omw::Color(inactiveCaptionText_argb);
450  const omw::Color info = omw::Color(info_argb);
451  const omw::Color infoText = omw::Color(infoText_argb);
452  const omw::Color menu = omw::Color(menu_argb);
453  const omw::Color menuBar = omw::Color(menuBar_argb);
454  const omw::Color menuHighlight = omw::Color(menuHighlight_argb);
455  const omw::Color menuText = omw::Color(menuText_argb);
456  const omw::Color scrollBar = omw::Color(scrollBar_argb);
457  const omw::Color window = omw::Color(window_argb);
458  const omw::Color windowFrame = omw::Color(windowFrame_argb);
459  const omw::Color windowText = omw::Color(windowText_argb);
460  }
461  }
462 
464 }
465 
466 #endif // IG_OMW_COLOR_H
omw::Color::r
uint8_t r() const
Definition: color.cpp:222
omw::Color::transparent
void transparent()
Sets the alpha value to 0. Does not change the validity.
Definition: color.cpp:108
omw::alphaComposit_apply
void alphaComposit_apply(int32_t a_ACCC, int32_t &b_ACCC)
Writes the alpha composit of A over B to B.
Definition: color.cpp:495
omw::Color::from_wxW_RGB
void from_wxW_RGB(uint32_t wxWCol)
Definition: color.cpp:393
omw::Color::setARGB
void setARGB(int32_t argb)
Definition: color.cpp:189
std::string
C++ standard string. See std::basic_string for detailed information.
Definition: linkToStd.dox:15
omw::Color::validate
void validate(bool state=true)
Definition: color.cpp:80
omw::Color::g
uint8_t g() const
Definition: color.cpp:228
omw::fromWinColor
omw::Color fromWinColor(uint32_t winCol)
Converts from a Windows API color.
Definition: color.cpp:519
omw::Color::b
uint8_t b() const
Definition: color.cpp:234
omw::Color::opaque
void opaque()
Sets the alpha value to 0xFF. Does not change the validity.
Definition: color.cpp:102
omw::Color::clear
void clear()
Sets R, G and B to 0, alpha to 0xFF and invalidates the object.
Definition: color.cpp:95
omw::Color::invalidate
void invalidate()
Invalidates the object.
Definition: color.cpp:89
omw::Color::to_wxW_RGB
uint32_t to_wxW_RGB() const
Definition: color.cpp:410
omw::Color::a
uint8_t a() const
Definition: color.cpp:240
omw::Color::toString
omw::string toString() const
Definition: color.cpp:274
omw::Color
Definition: color.h:21
omw::Color::toStringARGB
omw::string toStringARGB() const
Definition: color.cpp:287
omw::Color::toCssStr
omw::string toCssStr() const
Definition: color.cpp:296
omw::alphaComposit
int32_t alphaComposit(int32_t a_ACCC, int32_t b_ACCC)
Definition: color.cpp:434
omw::Color::toARGB
int32_t toARGB() const
Definition: color.cpp:258
omw::Color::operator+=
omw::Color & operator+=(const omw::Color &operand)
Definition: color.cpp:312
omw::Color::from_wxW_RGBA
void from_wxW_RGBA(uint32_t wxWCol)
See omw::fromWxColor()
Definition: color.cpp:399
omw::string
Definition: string.h:96
omw::Color::set
void set(int32_t rgb)
Definition: color.cpp:117
omw::Color::from_win
void from_win(uint32_t winCol)
See omw::fromWinColor()
Definition: color.cpp:372
omw::Color::to_wxW_RGBA
uint32_t to_wxW_RGBA() const
See omw::fromWxColor()
Definition: color.cpp:416
omw::Color::toRGB
int32_t toRGB() const
Definition: color.cpp:249
omw
Main namespace.
omw::Color::to_win
uint32_t to_win() const
See omw::fromWinColor()
Definition: color.cpp:381
omw::fromWxColor
omw::Color fromWxColor(uint32_t wxRGBA)
Converts from a wxWidgets API color.
Definition: color.cpp:532