1 /****************************************************************************
2 **
3 ** DQt - D bindings for the Qt Toolkit
4 **
5 ** GNU Lesser General Public License Usage
6 ** This file may be used under the terms of the GNU Lesser
7 ** General Public License version 3 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
9 ** packaging of this file. Please review the following information to
10 ** ensure the GNU Lesser General Public License version 3 requirements
11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
12 **
13 ****************************************************************************/
14 module qt.gui.color;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.global;
19 import qt.core.metatype;
20 import qt.core.namespace;
21 import qt.core.string;
22 import qt.core.stringlist;
23 import qt.core.stringview;
24 import qt.core.variant;
25 import qt.gui.rgb;
26 import qt.gui.rgba64;
27 import qt.helpers;
28 
29 /+ class QColor; +/
30 extern(C++, class) struct QColormap;
31 /+ class QVariant;
32 
33 #ifndef QT_NO_DEBUG_STREAM
34 Q_GUI_EXPORT QDebug operator<<(QDebug, const QColor &);
35 #endif
36 #ifndef QT_NO_DATASTREAM
37 Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QColor &);
38 Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &);
39 #endif +/
40 
41 @(QMetaType.Type.QColor) extern(C++, class) struct /+ Q_GUI_EXPORT +/ QColor
42 {
43 public:
44     enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl, ExtendedRgb }
45     enum NameFormat { HexRgb, HexArgb }
46 
47     /+this()/+ noexcept+/
48     {
49         this.cspec = Spec.Invalid;
50         this.ct = typeof(this.ct)(ushort.max, 0, 0, 0, 0);
51     }+/
52     this(/+ Qt:: +/qt.core.namespace.GlobalColor color)/+ noexcept+/;
53     this(int r, int g, int b, int a = 255)/+ noexcept+/
54     {
55         this.cspec = isRgbaValid(r, g, b, a) ? Spec.Rgb : Spec.Invalid;
56         this.ct = CT(CT.generated_qcolor_0(cast(ushort)(cspec == Spec.Rgb ? a * 0x0101 : 0),
57                      cast(ushort)(cspec == Spec.Rgb ? r * 0x0101 : 0),
58                      cast(ushort)(cspec == Spec.Rgb ? g * 0x0101 : 0),
59                      cast(ushort)(cspec == Spec.Rgb ? b * 0x0101 : 0),
60                      0));
61     }
62     this(QRgb rgb)/+ noexcept+/;
63     this(QRgba64 rgba64)/+ noexcept+/;
64     static if(QT_STRINGVIEW_LEVEL < 2)
65     {
66         pragma(inline, true) this(ref const(QString) aname)
67         { setNamedColor(aname); }
68     }
69 
70     ~this(){} // Makes sure, that QColor as return type is passed as a hidden pointer parameter.
71 
72     /+ explicit +/ pragma(inline, true) this(QStringView aname)
73     { setNamedColor(aname); }
74     pragma(inline, true) this(const(char)* aname)
75     {
76         this(QLatin1String(aname));
77     }
78     pragma(inline, true) this(QLatin1String aname)
79     { setNamedColor(aname); }
80     this(Spec spec)/+ noexcept+/;
81 
82 /+ #if QT_VERSION < QT_VERSION_CHECK(6,0,0) +/
83     // ### Qt 6: remove all of these, the trivial ones are fine.
84     /+@disable this(this);
85     this(ref const(QColor) color)/+ noexcept+/
86     {
87         this.cspec = color.cspec;
88         this.ct = color.ct;
89     }+/
90     /+ QColor(QColor &&other) noexcept : cspec(other.cspec), ct(other.ct) {} +/
91     /+ QColor &operator=(QColor &&other) noexcept
92     { cspec = other.cspec; ct = other.ct; return *this; } +/
93     /+ref QColor operator =(ref const(QColor) )/+ noexcept+/;+/
94 /+ #endif +/ // Qt < 6
95 
96     /+ref QColor operator =(/+ Qt:: +/qt.core.namespace.GlobalColor color)/+ noexcept+/;+/
97 
98     pragma(inline, true) bool isValid() const/+ noexcept+/
99     { return cspec != Spec.Invalid; }
100 
101     // ### Qt 6: merge overloads
102     QString name() const;
103     QString name(NameFormat format) const;
104 
105     static if(QT_STRINGVIEW_LEVEL < 2)
106     {
107         void setNamedColor(ref const(QString) name);
108     }
109     void setNamedColor(QStringView name);
110     void setNamedColor(QLatin1String name);
111 
112     static QStringList colorNames();
113 
114     pragma(inline, true) Spec spec() const/+ noexcept+/
115     { return cspec; }
116 
117     int alpha() const/+ noexcept+/;
118     void setAlpha(int alpha);
119 
120     qreal alphaF() const/+ noexcept+/;
121     void setAlphaF(qreal alpha);
122 
123     int red() const/+ noexcept+/;
124     int green() const/+ noexcept+/;
125     int blue() const/+ noexcept+/;
126     void setRed(int red);
127     void setGreen(int green);
128     void setBlue(int blue);
129 
130     qreal redF() const/+ noexcept+/;
131     qreal greenF() const/+ noexcept+/;
132     qreal blueF() const/+ noexcept+/;
133     void setRedF(qreal red);
134     void setGreenF(qreal green);
135     void setBlueF(qreal blue);
136 
137     void getRgb(int* r, int* g, int* b, int* a = null) const;
138     void setRgb(int r, int g, int b, int a = 255);
139 
140     void getRgbF(qreal* r, qreal* g, qreal* b, qreal* a = null) const;
141     void setRgbF(qreal r, qreal g, qreal b, qreal a = 1.0);
142 
143     QRgba64 rgba64() const/+ noexcept+/;
144     void setRgba64(QRgba64 rgba)/+ noexcept+/;
145 
146     QRgb rgba() const/+ noexcept+/;
147     void setRgba(QRgb rgba)/+ noexcept+/;
148 
149     QRgb rgb() const/+ noexcept+/;
150     void setRgb(QRgb rgb)/+ noexcept+/;
151 
152     int hue() const/+ noexcept+/; // 0 <= hue < 360
153     int saturation() const/+ noexcept+/;
154     int hsvHue() const/+ noexcept+/; // 0 <= hue < 360
155     int hsvSaturation() const/+ noexcept+/;
156     int value() const/+ noexcept+/;
157 
158     qreal hueF() const/+ noexcept+/; // 0.0 <= hueF < 360.0
159     qreal saturationF() const/+ noexcept+/;
160     qreal hsvHueF() const/+ noexcept+/; // 0.0 <= hueF < 360.0
161     qreal hsvSaturationF() const/+ noexcept+/;
162     qreal valueF() const/+ noexcept+/;
163 
164     void getHsv(int* h, int* s, int* v, int* a = null) const;
165     void setHsv(int h, int s, int v, int a = 255);
166 
167     void getHsvF(qreal* h, qreal* s, qreal* v, qreal* a = null) const;
168     void setHsvF(qreal h, qreal s, qreal v, qreal a = 1.0);
169 
170     int cyan() const/+ noexcept+/;
171     int magenta() const/+ noexcept+/;
172     int yellow() const/+ noexcept+/;
173     int black() const/+ noexcept+/;
174 
175     qreal cyanF() const/+ noexcept+/;
176     qreal magentaF() const/+ noexcept+/;
177     qreal yellowF() const/+ noexcept+/;
178     qreal blackF() const/+ noexcept+/;
179 
180     void getCmyk(int* c, int* m, int* y, int* k, int* a = null); // ### Qt 6: remove
181     void getCmyk(int* c, int* m, int* y, int* k, int* a = null) const;
182     void setCmyk(int c, int m, int y, int k, int a = 255);
183 
184     void getCmykF(qreal* c, qreal* m, qreal* y, qreal* k, qreal* a = null); // ### Qt 6: remove
185     void getCmykF(qreal* c, qreal* m, qreal* y, qreal* k, qreal* a = null) const;
186     void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
187 
188     int hslHue() const/+ noexcept+/; // 0 <= hue < 360
189     int hslSaturation() const/+ noexcept+/;
190     int lightness() const/+ noexcept+/;
191 
192     qreal hslHueF() const/+ noexcept+/; // 0.0 <= hueF < 360.0
193     qreal hslSaturationF() const/+ noexcept+/;
194     qreal lightnessF() const/+ noexcept+/;
195 
196     void getHsl(int* h, int* s, int* l, int* a = null) const;
197     void setHsl(int h, int s, int l, int a = 255);
198 
199     void getHslF(qreal* h, qreal* s, qreal* l, qreal* a = null) const;
200     void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
201 
202     QColor toRgb() const/+ noexcept+/;
203     QColor toHsv() const/+ noexcept+/;
204     QColor toCmyk() const/+ noexcept+/;
205     QColor toHsl() const/+ noexcept+/;
206     QColor toExtendedRgb() const/+ noexcept+/;
207 
208     /+ Q_REQUIRED_RESULT +/ QColor convertTo(Spec colorSpec) const/+ noexcept+/;
209 
210     static QColor fromRgb(QRgb rgb)/+ noexcept+/;
211     static QColor fromRgba(QRgb rgba)/+ noexcept+/;
212 
213     static QColor fromRgb(int r, int g, int b, int a = 255);
214     static QColor fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0);
215 
216     static QColor fromRgba64(ushort r, ushort g, ushort b, ushort a = ushort.max)/+ noexcept+/;
217     static QColor fromRgba64(QRgba64 rgba)/+ noexcept+/;
218 
219     static QColor fromHsv(int h, int s, int v, int a = 255);
220     static QColor fromHsvF(qreal h, qreal s, qreal v, qreal a = 1.0);
221 
222     static QColor fromCmyk(int c, int m, int y, int k, int a = 255);
223     static QColor fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
224 
225     static QColor fromHsl(int h, int s, int l, int a = 255);
226     static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
227 
228 /+ #if QT_DEPRECATED_SINCE(5, 13) +/
229     /+ QT_DEPRECATED_X("Use QColor::lighter() instead") +/
230         /+ Q_REQUIRED_RESULT +/ QColor light(int f = 150) const/+ noexcept+/;
231     /+ QT_DEPRECATED_X("Use QColor::darker() instead") +/
232         /+ Q_REQUIRED_RESULT +/ QColor dark(int f = 200) const/+ noexcept+/;
233 /+ #endif +/
234     /+ Q_REQUIRED_RESULT +/ QColor lighter(int f = 150) const/+ noexcept+/;
235     /+ Q_REQUIRED_RESULT +/ QColor darker(int f = 200) const/+ noexcept+/;
236 
237     /+bool operator ==(ref const(QColor) c) const/+ noexcept+/;+/
238     /+bool operator !=(ref const(QColor) c) const/+ noexcept+/;+/
239 
240     /+auto opCast(T : QVariant)() const;+/
241 
242     static if(QT_STRINGVIEW_LEVEL < 2)
243     {
244         static bool isValidColor(ref const(QString) name);
245     }
246     static bool isValidColor(QStringView)/+ noexcept+/;
247     static bool isValidColor(QLatin1String)/+ noexcept+/;
248 
249 private:
250 
251     void invalidate()/+ noexcept+/;
252     /+ template <typename String> +/
253     /+ bool setColorFromString(String name); +/
254 
255     static bool isRgbaValid(int r, int g, int b, int a = 255)/+ noexcept /+ Q_DECL_CONST_FUNCTION +/
256     __attribute__((const))+/    {
257         return uint(r) <= 255 && uint(g) <= 255 && uint(b) <= 255 && uint(a) <= 255;
258     }
259 
260     Spec cspec = Spec.Invalid;
261     union CT {
262 /+ #ifdef Q_COMPILER_UNIFORM_INIT
263         CT() {} // doesn't init anything, thus can't be constexpr
264         explicit CT(ushort a1, ushort a2, ushort a3, ushort a4, ushort a5) noexcept
265             : array{a1, a2, a3, a4, a5} {}
266 #endif +/
267         struct generated_qcolor_0 {
268             ushort alpha;
269             ushort red;
270             ushort green;
271             ushort blue;
272             ushort pad;
273         }generated_qcolor_0 argb;
274         struct generated_qcolor_1 {
275             ushort alpha;
276             ushort hue;
277             ushort saturation;
278             ushort value;
279             ushort pad;
280         }generated_qcolor_1 ahsv;
281         struct generated_qcolor_2 {
282             ushort alpha;
283             ushort cyan;
284             ushort magenta;
285             ushort yellow;
286             ushort black;
287         }generated_qcolor_2 acmyk;
288         struct generated_qcolor_3 {
289             ushort alpha;
290             ushort hue;
291             ushort saturation;
292             ushort lightness;
293             ushort pad;
294         }generated_qcolor_3 ahsl;
295         struct generated_qcolor_4 {
296             ushort alphaF16;
297             ushort redF16;
298             ushort greenF16;
299             ushort blueF16;
300             ushort pad;
301         }generated_qcolor_4 argbExtended;
302         ushort[5] array;
303     }CT ct = CT(CT.generated_qcolor_0(ushort.max, 0, 0, 0, 0));
304 
305     /+ friend class QColormap; +/
306 /+ #ifndef QT_NO_DATASTREAM +/
307     version(QT_NO_DATASTREAM){}else
308     {
309         /+ friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QColor &); +/
310         /+ friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &); +/
311     }
312 /+ #endif
313 
314 #ifdef Q_COMPILER_UNIFORM_INIT
315 public: // can't give friendship to a namespace, so it needs to be public
316     explicit QColor(Spec spec, ushort a1, ushort a2, ushort a3, ushort a4, ushort a5=0) noexcept
317         : cspec(spec), ct(a1, a2, a3, a4, a5) {}
318 #endif +/ // Q_COMPILER_UNIFORM_INIT
319 }
320 /+ Q_DECLARE_TYPEINFO(QColor, QT_VERSION >= QT_VERSION_CHECK(6,0,0) ? Q_MOVABLE_TYPE : Q_RELOCATABLE_TYPE);
321 
322 #if QT_STRINGVIEW_LEVEL < 2
323 #endif +/
324 
325 // define these namespaces even if the contents are ifdef'd out
326 extern(C++, "QColorConstants")
327 {
328 
329 /+ namespace Svg {}
330 
331 #if defined(Q_COMPILER_CONSTEXPR) & defined(Q_COMPILER_UNIFORM_INIT)
332     // Qt::GlobalColor names
333     constexpr Q_DECL_UNUSED QColor Color0      {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
334     constexpr Q_DECL_UNUSED QColor Color1      {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101};
335     constexpr Q_DECL_UNUSED QColor Black       {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
336     constexpr Q_DECL_UNUSED QColor White       {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101};
337     constexpr Q_DECL_UNUSED QColor DarkGray    {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
338     constexpr Q_DECL_UNUSED QColor Gray        {QColor::Rgb, 0xff * 0x101, 0xa0 * 0x101, 0xa0 * 0x101, 0xa4 * 0x101};
339     constexpr Q_DECL_UNUSED QColor LightGray   {QColor::Rgb, 0xff * 0x101, 0xc0 * 0x101, 0xc0 * 0x101, 0xc0 * 0x101};
340     constexpr Q_DECL_UNUSED QColor Red         {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101};
341     constexpr Q_DECL_UNUSED QColor Green       {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0x00 * 0x101};
342     constexpr Q_DECL_UNUSED QColor Blue        {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0xff * 0x101};
343     constexpr Q_DECL_UNUSED QColor Cyan        {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0xff * 0x101};
344     constexpr Q_DECL_UNUSED QColor Magenta     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101};
345     constexpr Q_DECL_UNUSED QColor Yellow      {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101};
346     constexpr Q_DECL_UNUSED QColor DarkRed     {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
347     constexpr Q_DECL_UNUSED QColor DarkGreen   {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
348     constexpr Q_DECL_UNUSED QColor DarkBlue    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
349     constexpr Q_DECL_UNUSED QColor DarkCyan    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
350     constexpr Q_DECL_UNUSED QColor DarkMagenta {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
351     constexpr Q_DECL_UNUSED QColor DarkYellow  {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
352     constexpr Q_DECL_UNUSED QColor Transparent {QColor::Rgb, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
353 
354     // SVG names supported by QColor (see qcolor.cpp).
355 namespace Svg {
356     constexpr Q_DECL_UNUSED QColor aliceblue                {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xf8 * 0x101, 0xff * 0x101};
357     constexpr Q_DECL_UNUSED QColor antiquewhite             {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0xeb * 0x101, 0xd7 * 0x101};
358     constexpr Q_DECL_UNUSED QColor aqua                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0xff * 0x101};
359     constexpr Q_DECL_UNUSED QColor aquamarine               {QColor::Rgb, 0xff * 0x101, 0x7f * 0x101, 0xff * 0x101, 0xd4 * 0x101};
360     constexpr Q_DECL_UNUSED QColor azure                    {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xff * 0x101, 0xff * 0x101};
361     constexpr Q_DECL_UNUSED QColor beige                    {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xf5 * 0x101, 0xdc * 0x101};
362     constexpr Q_DECL_UNUSED QColor bisque                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xe4 * 0x101, 0xc4 * 0x101};
363     constexpr Q_DECL_UNUSED QColor black                    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
364     constexpr Q_DECL_UNUSED QColor blanchedalmond           {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xeb * 0x101, 0xcd * 0x101};
365     constexpr Q_DECL_UNUSED QColor blue                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0xff * 0x101};
366     constexpr Q_DECL_UNUSED QColor blueviolet               {QColor::Rgb, 0xff * 0x101, 0x8a * 0x101, 0x2b * 0x101, 0xe2 * 0x101};
367     constexpr Q_DECL_UNUSED QColor brown                    {QColor::Rgb, 0xff * 0x101, 0xa5 * 0x101, 0x2a * 0x101, 0x2a * 0x101};
368     constexpr Q_DECL_UNUSED QColor burlywood                {QColor::Rgb, 0xff * 0x101, 0xde * 0x101, 0xb8 * 0x101, 0x87 * 0x101};
369     constexpr Q_DECL_UNUSED QColor cadetblue                {QColor::Rgb, 0xff * 0x101, 0x5f * 0x101, 0x9e * 0x101, 0xa0 * 0x101};
370     constexpr Q_DECL_UNUSED QColor chartreuse               {QColor::Rgb, 0xff * 0x101, 0x7f * 0x101, 0xff * 0x101, 0x00 * 0x101};
371     constexpr Q_DECL_UNUSED QColor chocolate                {QColor::Rgb, 0xff * 0x101, 0xd2 * 0x101, 0x69 * 0x101, 0x1e * 0x101};
372     constexpr Q_DECL_UNUSED QColor coral                    {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x7f * 0x101, 0x50 * 0x101};
373     constexpr Q_DECL_UNUSED QColor cornflowerblue           {QColor::Rgb, 0xff * 0x101, 0x64 * 0x101, 0x95 * 0x101, 0xed * 0x101};
374     constexpr Q_DECL_UNUSED QColor cornsilk                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xf8 * 0x101, 0xdc * 0x101};
375     constexpr Q_DECL_UNUSED QColor crimson                  {QColor::Rgb, 0xff * 0x101, 0xdc * 0x101, 0x14 * 0x101, 0x3c * 0x101};
376     constexpr Q_DECL_UNUSED QColor cyan                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0xff * 0x101};
377     constexpr Q_DECL_UNUSED QColor darkblue                 {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x8b * 0x101};
378     constexpr Q_DECL_UNUSED QColor darkcyan                 {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x8b * 0x101, 0x8b * 0x101};
379     constexpr Q_DECL_UNUSED QColor darkgoldenrod            {QColor::Rgb, 0xff * 0x101, 0xb8 * 0x101, 0x86 * 0x101, 0x0b * 0x101};
380     constexpr Q_DECL_UNUSED QColor darkgray                 {QColor::Rgb, 0xff * 0x101, 0xa9 * 0x101, 0xa9 * 0x101, 0xa9 * 0x101};
381     constexpr Q_DECL_UNUSED QColor darkgreen                {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x64 * 0x101, 0x00 * 0x101};
382     constexpr Q_DECL_UNUSED QColor darkgrey                 {QColor::Rgb, 0xff * 0x101, 0xa9 * 0x101, 0xa9 * 0x101, 0xa9 * 0x101};
383     constexpr Q_DECL_UNUSED QColor darkkhaki                {QColor::Rgb, 0xff * 0x101, 0xbd * 0x101, 0xb7 * 0x101, 0x6b * 0x101};
384     constexpr Q_DECL_UNUSED QColor darkmagenta              {QColor::Rgb, 0xff * 0x101, 0x8b * 0x101, 0x00 * 0x101, 0x8b * 0x101};
385     constexpr Q_DECL_UNUSED QColor darkolivegreen           {QColor::Rgb, 0xff * 0x101, 0x55 * 0x101, 0x6b * 0x101, 0x2f * 0x101};
386     constexpr Q_DECL_UNUSED QColor darkorange               {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x8c * 0x101, 0x00 * 0x101};
387     constexpr Q_DECL_UNUSED QColor darkorchid               {QColor::Rgb, 0xff * 0x101, 0x99 * 0x101, 0x32 * 0x101, 0xcc * 0x101};
388     constexpr Q_DECL_UNUSED QColor darkred                  {QColor::Rgb, 0xff * 0x101, 0x8b * 0x101, 0x00 * 0x101, 0x00 * 0x101};
389     constexpr Q_DECL_UNUSED QColor darksalmon               {QColor::Rgb, 0xff * 0x101, 0xe9 * 0x101, 0x96 * 0x101, 0x7a * 0x101};
390     constexpr Q_DECL_UNUSED QColor darkseagreen             {QColor::Rgb, 0xff * 0x101, 0x8f * 0x101, 0xbc * 0x101, 0x8f * 0x101};
391     constexpr Q_DECL_UNUSED QColor darkslateblue            {QColor::Rgb, 0xff * 0x101, 0x48 * 0x101, 0x3d * 0x101, 0x8b * 0x101};
392     constexpr Q_DECL_UNUSED QColor darkslategray            {QColor::Rgb, 0xff * 0x101, 0x2f * 0x101, 0x4f * 0x101, 0x4f * 0x101};
393     constexpr Q_DECL_UNUSED QColor darkslategrey            {QColor::Rgb, 0xff * 0x101, 0x2f * 0x101, 0x4f * 0x101, 0x4f * 0x101};
394     constexpr Q_DECL_UNUSED QColor darkturquoise            {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xce * 0x101, 0xd1 * 0x101};
395     constexpr Q_DECL_UNUSED QColor darkviolet               {QColor::Rgb, 0xff * 0x101, 0x94 * 0x101, 0x00 * 0x101, 0xd3 * 0x101};
396     constexpr Q_DECL_UNUSED QColor deeppink                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x14 * 0x101, 0x93 * 0x101};
397     constexpr Q_DECL_UNUSED QColor deepskyblue              {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xbf * 0x101, 0xff * 0x101};
398     constexpr Q_DECL_UNUSED QColor dimgray                  {QColor::Rgb, 0xff * 0x101, 0x69 * 0x101, 0x69 * 0x101, 0x69 * 0x101};
399     constexpr Q_DECL_UNUSED QColor dimgrey                  {QColor::Rgb, 0xff * 0x101, 0x69 * 0x101, 0x69 * 0x101, 0x69 * 0x101};
400     constexpr Q_DECL_UNUSED QColor dodgerblue               {QColor::Rgb, 0xff * 0x101, 0x1e * 0x101, 0x90 * 0x101, 0xff * 0x101};
401     constexpr Q_DECL_UNUSED QColor firebrick                {QColor::Rgb, 0xff * 0x101, 0xb2 * 0x101, 0x22 * 0x101, 0x22 * 0x101};
402     constexpr Q_DECL_UNUSED QColor floralwhite              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xfa * 0x101, 0xf0 * 0x101};
403     constexpr Q_DECL_UNUSED QColor forestgreen              {QColor::Rgb, 0xff * 0x101, 0x22 * 0x101, 0x8b * 0x101, 0x22 * 0x101};
404     constexpr Q_DECL_UNUSED QColor fuchsia                  {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101};
405     constexpr Q_DECL_UNUSED QColor gainsboro                {QColor::Rgb, 0xff * 0x101, 0xdc * 0x101, 0xdc * 0x101, 0xdc * 0x101};
406     constexpr Q_DECL_UNUSED QColor ghostwhite               {QColor::Rgb, 0xff * 0x101, 0xf8 * 0x101, 0xf8 * 0x101, 0xff * 0x101};
407     constexpr Q_DECL_UNUSED QColor gold                     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xd7 * 0x101, 0x00 * 0x101};
408     constexpr Q_DECL_UNUSED QColor goldenrod                {QColor::Rgb, 0xff * 0x101, 0xda * 0x101, 0xa5 * 0x101, 0x20 * 0x101};
409     constexpr Q_DECL_UNUSED QColor gray                     {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
410     constexpr Q_DECL_UNUSED QColor green                    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
411     constexpr Q_DECL_UNUSED QColor greenyellow              {QColor::Rgb, 0xff * 0x101, 0xad * 0x101, 0xff * 0x101, 0x2f * 0x101};
412     constexpr Q_DECL_UNUSED QColor grey                     {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
413     constexpr Q_DECL_UNUSED QColor honeydew                 {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xff * 0x101, 0xf0 * 0x101};
414     constexpr Q_DECL_UNUSED QColor hotpink                  {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x69 * 0x101, 0xb4 * 0x101};
415     constexpr Q_DECL_UNUSED QColor indianred                {QColor::Rgb, 0xff * 0x101, 0xcd * 0x101, 0x5c * 0x101, 0x5c * 0x101};
416     constexpr Q_DECL_UNUSED QColor indigo                   {QColor::Rgb, 0xff * 0x101, 0x4b * 0x101, 0x00 * 0x101, 0x82 * 0x101};
417     constexpr Q_DECL_UNUSED QColor ivory                    {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xf0 * 0x101};
418     constexpr Q_DECL_UNUSED QColor khaki                    {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xe6 * 0x101, 0x8c * 0x101};
419     constexpr Q_DECL_UNUSED QColor lavender                 {QColor::Rgb, 0xff * 0x101, 0xe6 * 0x101, 0xe6 * 0x101, 0xfa * 0x101};
420     constexpr Q_DECL_UNUSED QColor lavenderblush            {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xf0 * 0x101, 0xf5 * 0x101};
421     constexpr Q_DECL_UNUSED QColor lawngreen                {QColor::Rgb, 0xff * 0x101, 0x7c * 0x101, 0xfc * 0x101, 0x00 * 0x101};
422     constexpr Q_DECL_UNUSED QColor lemonchiffon             {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xfa * 0x101, 0xcd * 0x101};
423     constexpr Q_DECL_UNUSED QColor lightblue                {QColor::Rgb, 0xff * 0x101, 0xad * 0x101, 0xd8 * 0x101, 0xe6 * 0x101};
424     constexpr Q_DECL_UNUSED QColor lightcoral               {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
425     constexpr Q_DECL_UNUSED QColor lightcyan                {QColor::Rgb, 0xff * 0x101, 0xe0 * 0x101, 0xff * 0x101, 0xff * 0x101};
426     constexpr Q_DECL_UNUSED QColor lightgoldenrodyellow     {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0xfa * 0x101, 0xd2 * 0x101};
427     constexpr Q_DECL_UNUSED QColor lightgray                {QColor::Rgb, 0xff * 0x101, 0xd3 * 0x101, 0xd3 * 0x101, 0xd3 * 0x101};
428     constexpr Q_DECL_UNUSED QColor lightgreen               {QColor::Rgb, 0xff * 0x101, 0x90 * 0x101, 0xee * 0x101, 0x90 * 0x101};
429     constexpr Q_DECL_UNUSED QColor lightgrey                {QColor::Rgb, 0xff * 0x101, 0xd3 * 0x101, 0xd3 * 0x101, 0xd3 * 0x101};
430     constexpr Q_DECL_UNUSED QColor lightpink                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xb6 * 0x101, 0xc1 * 0x101};
431     constexpr Q_DECL_UNUSED QColor lightsalmon              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xa0 * 0x101, 0x7a * 0x101};
432     constexpr Q_DECL_UNUSED QColor lightseagreen            {QColor::Rgb, 0xff * 0x101, 0x20 * 0x101, 0xb2 * 0x101, 0xaa * 0x101};
433     constexpr Q_DECL_UNUSED QColor lightskyblue             {QColor::Rgb, 0xff * 0x101, 0x87 * 0x101, 0xce * 0x101, 0xfa * 0x101};
434     constexpr Q_DECL_UNUSED QColor lightslategray           {QColor::Rgb, 0xff * 0x101, 0x77 * 0x101, 0x88 * 0x101, 0x99 * 0x101};
435     constexpr Q_DECL_UNUSED QColor lightslategrey           {QColor::Rgb, 0xff * 0x101, 0x77 * 0x101, 0x88 * 0x101, 0x99 * 0x101};
436     constexpr Q_DECL_UNUSED QColor lightsteelblue           {QColor::Rgb, 0xff * 0x101, 0xb0 * 0x101, 0xc4 * 0x101, 0xde * 0x101};
437     constexpr Q_DECL_UNUSED QColor lightyellow              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xe0 * 0x101};
438     constexpr Q_DECL_UNUSED QColor lime                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0x00 * 0x101};
439     constexpr Q_DECL_UNUSED QColor limegreen                {QColor::Rgb, 0xff * 0x101, 0x32 * 0x101, 0xcd * 0x101, 0x32 * 0x101};
440     constexpr Q_DECL_UNUSED QColor linen                    {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0xf0 * 0x101, 0xe6 * 0x101};
441     constexpr Q_DECL_UNUSED QColor magenta                  {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101};
442     constexpr Q_DECL_UNUSED QColor maroon                   {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
443     constexpr Q_DECL_UNUSED QColor mediumaquamarine         {QColor::Rgb, 0xff * 0x101, 0x66 * 0x101, 0xcd * 0x101, 0xaa * 0x101};
444     constexpr Q_DECL_UNUSED QColor mediumblue               {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0xcd * 0x101};
445     constexpr Q_DECL_UNUSED QColor mediumorchid             {QColor::Rgb, 0xff * 0x101, 0xba * 0x101, 0x55 * 0x101, 0xd3 * 0x101};
446     constexpr Q_DECL_UNUSED QColor mediumpurple             {QColor::Rgb, 0xff * 0x101, 0x93 * 0x101, 0x70 * 0x101, 0xdb * 0x101};
447     constexpr Q_DECL_UNUSED QColor mediumseagreen           {QColor::Rgb, 0xff * 0x101, 0x3c * 0x101, 0xb3 * 0x101, 0x71 * 0x101};
448     constexpr Q_DECL_UNUSED QColor mediumslateblue          {QColor::Rgb, 0xff * 0x101, 0x7b * 0x101, 0x68 * 0x101, 0xee * 0x101};
449     constexpr Q_DECL_UNUSED QColor mediumspringgreen        {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xfa * 0x101, 0x9a * 0x101};
450     constexpr Q_DECL_UNUSED QColor mediumturquoise          {QColor::Rgb, 0xff * 0x101, 0x48 * 0x101, 0xd1 * 0x101, 0xcc * 0x101};
451     constexpr Q_DECL_UNUSED QColor mediumvioletred          {QColor::Rgb, 0xff * 0x101, 0xc7 * 0x101, 0x15 * 0x101, 0x85 * 0x101};
452     constexpr Q_DECL_UNUSED QColor midnightblue             {QColor::Rgb, 0xff * 0x101, 0x19 * 0x101, 0x19 * 0x101, 0x70 * 0x101};
453     constexpr Q_DECL_UNUSED QColor mintcream                {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xff * 0x101, 0xfa * 0x101};
454     constexpr Q_DECL_UNUSED QColor mistyrose                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xe4 * 0x101, 0xe1 * 0x101};
455     constexpr Q_DECL_UNUSED QColor moccasin                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xe4 * 0x101, 0xb5 * 0x101};
456     constexpr Q_DECL_UNUSED QColor navajowhite              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xde * 0x101, 0xad * 0x101};
457     constexpr Q_DECL_UNUSED QColor navy                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
458     constexpr Q_DECL_UNUSED QColor oldlace                  {QColor::Rgb, 0xff * 0x101, 0xfd * 0x101, 0xf5 * 0x101, 0xe6 * 0x101};
459     constexpr Q_DECL_UNUSED QColor olive                    {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
460     constexpr Q_DECL_UNUSED QColor olivedrab                {QColor::Rgb, 0xff * 0x101, 0x6b * 0x101, 0x8e * 0x101, 0x23 * 0x101};
461     constexpr Q_DECL_UNUSED QColor orange                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xa5 * 0x101, 0x00 * 0x101};
462     constexpr Q_DECL_UNUSED QColor orangered                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x45 * 0x101, 0x00 * 0x101};
463     constexpr Q_DECL_UNUSED QColor orchid                   {QColor::Rgb, 0xff * 0x101, 0xda * 0x101, 0x70 * 0x101, 0xd6 * 0x101};
464     constexpr Q_DECL_UNUSED QColor palegoldenrod            {QColor::Rgb, 0xff * 0x101, 0xee * 0x101, 0xe8 * 0x101, 0xaa * 0x101};
465     constexpr Q_DECL_UNUSED QColor palegreen                {QColor::Rgb, 0xff * 0x101, 0x98 * 0x101, 0xfb * 0x101, 0x98 * 0x101};
466     constexpr Q_DECL_UNUSED QColor paleturquoise            {QColor::Rgb, 0xff * 0x101, 0xaf * 0x101, 0xee * 0x101, 0xee * 0x101};
467     constexpr Q_DECL_UNUSED QColor palevioletred            {QColor::Rgb, 0xff * 0x101, 0xdb * 0x101, 0x70 * 0x101, 0x93 * 0x101};
468     constexpr Q_DECL_UNUSED QColor papayawhip               {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xef * 0x101, 0xd5 * 0x101};
469     constexpr Q_DECL_UNUSED QColor peachpuff                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xda * 0x101, 0xb9 * 0x101};
470     constexpr Q_DECL_UNUSED QColor peru                     {QColor::Rgb, 0xff * 0x101, 0xcd * 0x101, 0x85 * 0x101, 0x3f * 0x101};
471     constexpr Q_DECL_UNUSED QColor pink                     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xc0 * 0x101, 0xcb * 0x101};
472     constexpr Q_DECL_UNUSED QColor plum                     {QColor::Rgb, 0xff * 0x101, 0xdd * 0x101, 0xa0 * 0x101, 0xdd * 0x101};
473     constexpr Q_DECL_UNUSED QColor powderblue               {QColor::Rgb, 0xff * 0x101, 0xb0 * 0x101, 0xe0 * 0x101, 0xe6 * 0x101};
474     constexpr Q_DECL_UNUSED QColor purple                   {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
475     constexpr Q_DECL_UNUSED QColor red                      {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101};
476     constexpr Q_DECL_UNUSED QColor rosybrown                {QColor::Rgb, 0xff * 0x101, 0xbc * 0x101, 0x8f * 0x101, 0x8f * 0x101};
477     constexpr Q_DECL_UNUSED QColor royalblue                {QColor::Rgb, 0xff * 0x101, 0x41 * 0x101, 0x69 * 0x101, 0xe1 * 0x101};
478     constexpr Q_DECL_UNUSED QColor saddlebrown              {QColor::Rgb, 0xff * 0x101, 0x8b * 0x101, 0x45 * 0x101, 0x13 * 0x101};
479     constexpr Q_DECL_UNUSED QColor salmon                   {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0x80 * 0x101, 0x72 * 0x101};
480     constexpr Q_DECL_UNUSED QColor sandybrown               {QColor::Rgb, 0xff * 0x101, 0xf4 * 0x101, 0xa4 * 0x101, 0x60 * 0x101};
481     constexpr Q_DECL_UNUSED QColor seagreen                 {QColor::Rgb, 0xff * 0x101, 0x2e * 0x101, 0x8b * 0x101, 0x57 * 0x101};
482     constexpr Q_DECL_UNUSED QColor seashell                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xf5 * 0x101, 0xee * 0x101};
483     constexpr Q_DECL_UNUSED QColor sienna                   {QColor::Rgb, 0xff * 0x101, 0xa0 * 0x101, 0x52 * 0x101, 0x2d * 0x101};
484     constexpr Q_DECL_UNUSED QColor silver                   {QColor::Rgb, 0xff * 0x101, 0xc0 * 0x101, 0xc0 * 0x101, 0xc0 * 0x101};
485     constexpr Q_DECL_UNUSED QColor skyblue                  {QColor::Rgb, 0xff * 0x101, 0x87 * 0x101, 0xce * 0x101, 0xeb * 0x101};
486     constexpr Q_DECL_UNUSED QColor slateblue                {QColor::Rgb, 0xff * 0x101, 0x6a * 0x101, 0x5a * 0x101, 0xcd * 0x101};
487     constexpr Q_DECL_UNUSED QColor slategray                {QColor::Rgb, 0xff * 0x101, 0x70 * 0x101, 0x80 * 0x101, 0x90 * 0x101};
488     constexpr Q_DECL_UNUSED QColor slategrey                {QColor::Rgb, 0xff * 0x101, 0x70 * 0x101, 0x80 * 0x101, 0x90 * 0x101};
489     constexpr Q_DECL_UNUSED QColor snow                     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xfa * 0x101, 0xfa * 0x101};
490     constexpr Q_DECL_UNUSED QColor springgreen              {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0x7f * 0x101};
491     constexpr Q_DECL_UNUSED QColor steelblue                {QColor::Rgb, 0xff * 0x101, 0x46 * 0x101, 0x82 * 0x101, 0xb4 * 0x101};
492     constexpr Q_DECL_UNUSED QColor tan                      {QColor::Rgb, 0xff * 0x101, 0xd2 * 0x101, 0xb4 * 0x101, 0x8c * 0x101};
493     constexpr Q_DECL_UNUSED QColor teal                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
494     constexpr Q_DECL_UNUSED QColor thistle                  {QColor::Rgb, 0xff * 0x101, 0xd8 * 0x101, 0xbf * 0x101, 0xd8 * 0x101};
495     constexpr Q_DECL_UNUSED QColor tomato                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x63 * 0x101, 0x47 * 0x101};
496     constexpr Q_DECL_UNUSED QColor turquoise                {QColor::Rgb, 0xff * 0x101, 0x40 * 0x101, 0xe0 * 0x101, 0xd0 * 0x101};
497     constexpr Q_DECL_UNUSED QColor violet                   {QColor::Rgb, 0xff * 0x101, 0xee * 0x101, 0x82 * 0x101, 0xee * 0x101};
498     constexpr Q_DECL_UNUSED QColor wheat                    {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xde * 0x101, 0xb3 * 0x101};
499     constexpr Q_DECL_UNUSED QColor white                    {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101};
500     constexpr Q_DECL_UNUSED QColor whitesmoke               {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xf5 * 0x101, 0xf5 * 0x101};
501     constexpr Q_DECL_UNUSED QColor yellow                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101};
502     constexpr Q_DECL_UNUSED QColor yellowgreen              {QColor::Rgb, 0xff * 0x101, 0x9a * 0x101, 0xcd * 0x101, 0x32 * 0x101};
503 }  // namespace Svg
504 #endif +/ // Q_COMPILER_CONSTEXPR && Q_COMPILER_UNIFORM_INIT
505 }  // namespace QColorLiterals
506