Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtGui/qcolor.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2020 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QCOLOR_H
0005 #define QCOLOR_H
0006 
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtGui/qrgb.h>
0009 #include <QtCore/qnamespace.h>
0010 #include <QtCore/qstringlist.h>
0011 #include <QtGui/qrgba64.h>
0012 
0013 #include <limits.h>
0014 
0015 QT_BEGIN_NAMESPACE
0016 
0017 
0018 class QColor;
0019 class QColormap;
0020 class QVariant;
0021 
0022 #ifndef QT_NO_DEBUG_STREAM
0023 Q_GUI_EXPORT QDebug operator<<(QDebug, const QColor &);
0024 #endif
0025 #ifndef QT_NO_DATASTREAM
0026 Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QColor &);
0027 Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &);
0028 #endif
0029 
0030 class Q_GUI_EXPORT QColor
0031 {
0032 public:
0033     // ### Qt7: make this "enum Spec: quint8 {...}" and reorder the members below for tighter
0034     //          struct packing. QColor could fit into the inline storage of a QVariant on 32bit.
0035     enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl, ExtendedRgb };
0036     enum NameFormat { HexRgb, HexArgb };
0037 
0038     constexpr QColor() noexcept
0039         : cspec(Invalid), ct(USHRT_MAX, 0, 0, 0, 0) {}
0040     QColor(Qt::GlobalColor color) noexcept;
0041     constexpr QColor(int r, int g, int b, int a = 255) noexcept
0042         : cspec(isRgbaValid(r, g, b, a) ? Rgb : Invalid),
0043           ct(ushort(cspec == Rgb ? a * 0x0101 : 0),
0044              ushort(cspec == Rgb ? r * 0x0101 : 0),
0045              ushort(cspec == Rgb ? g * 0x0101 : 0),
0046              ushort(cspec == Rgb ? b * 0x0101 : 0),
0047              0) {}
0048     QColor(QRgb rgb) noexcept;
0049     QColor(QRgba64 rgba64) noexcept;
0050     inline QColor(const QString& name);
0051     explicit inline QColor(QStringView name);
0052     inline QColor(const char *aname);
0053     inline QColor(QLatin1StringView name);
0054     QColor(Spec spec) noexcept;
0055 
0056     static QColor fromString(QAnyStringView name) noexcept;
0057 
0058     QColor &operator=(Qt::GlobalColor color) noexcept;
0059 
0060     bool isValid() const noexcept;
0061 
0062     QString name(NameFormat format = HexRgb) const;
0063 
0064 #if QT_DEPRECATED_SINCE(6, 6)
0065     QT_DEPRECATED_VERSION_X_6_6("Use fromString() instead.")
0066     void setNamedColor(const QString& name);
0067     QT_DEPRECATED_VERSION_X_6_6("Use fromString() instead.")
0068     void setNamedColor(QStringView name);
0069     QT_DEPRECATED_VERSION_X_6_6("Use fromString() instead.")
0070     void setNamedColor(QLatin1StringView name);
0071 #endif
0072 
0073     static QStringList colorNames();
0074 
0075     inline Spec spec() const noexcept
0076     { return cspec; }
0077 
0078     int alpha() const noexcept;
0079     void setAlpha(int alpha);
0080 
0081     float alphaF() const noexcept;
0082     void setAlphaF(float alpha);
0083 
0084     int red() const noexcept;
0085     int green() const noexcept;
0086     int blue() const noexcept;
0087     void setRed(int red);
0088     void setGreen(int green);
0089     void setBlue(int blue);
0090 
0091     float redF() const noexcept;
0092     float greenF() const noexcept;
0093     float blueF() const noexcept;
0094     void setRedF(float red);
0095     void setGreenF(float green);
0096     void setBlueF(float blue);
0097 
0098     void getRgb(int *r, int *g, int *b, int *a = nullptr) const;
0099     void setRgb(int r, int g, int b, int a = 255);
0100 
0101     void getRgbF(float *r, float *g, float *b, float *a = nullptr) const;
0102     void setRgbF(float r, float g, float b, float a = 1.0);
0103 
0104     QRgba64 rgba64() const noexcept;
0105     void setRgba64(QRgba64 rgba) noexcept;
0106 
0107     QRgb rgba() const noexcept;
0108     void setRgba(QRgb rgba) noexcept;
0109 
0110     QRgb rgb() const noexcept;
0111     void setRgb(QRgb rgb) noexcept;
0112 
0113     int hue() const noexcept; // 0 <= hue < 360
0114     int saturation() const noexcept;
0115     int hsvHue() const noexcept; // 0 <= hue < 360
0116     int hsvSaturation() const noexcept;
0117     int value() const noexcept;
0118 
0119     float hueF() const noexcept; // 0.0 <= hueF < 360.0
0120     float saturationF() const noexcept;
0121     float hsvHueF() const noexcept; // 0.0 <= hueF < 360.0
0122     float hsvSaturationF() const noexcept;
0123     float valueF() const noexcept;
0124 
0125     void getHsv(int *h, int *s, int *v, int *a = nullptr) const;
0126     void setHsv(int h, int s, int v, int a = 255);
0127 
0128     void getHsvF(float *h, float *s, float *v, float *a = nullptr) const;
0129     void setHsvF(float h, float s, float v, float a = 1.0);
0130 
0131     int cyan() const noexcept;
0132     int magenta() const noexcept;
0133     int yellow() const noexcept;
0134     int black() const noexcept;
0135 
0136     float cyanF() const noexcept;
0137     float magentaF() const noexcept;
0138     float yellowF() const noexcept;
0139     float blackF() const noexcept;
0140 
0141     void getCmyk(int *c, int *m, int *y, int *k, int *a = nullptr) const;
0142     void setCmyk(int c, int m, int y, int k, int a = 255);
0143 
0144     void getCmykF(float *c, float *m, float *y, float *k, float *a = nullptr) const;
0145     void setCmykF(float c, float m, float y, float k, float a = 1.0);
0146 
0147     int hslHue() const noexcept; // 0 <= hue < 360
0148     int hslSaturation() const noexcept;
0149     int lightness() const noexcept;
0150 
0151     float hslHueF() const noexcept; // 0.0 <= hueF < 360.0
0152     float hslSaturationF() const noexcept;
0153     float lightnessF() const noexcept;
0154 
0155     void getHsl(int *h, int *s, int *l, int *a = nullptr) const;
0156     void setHsl(int h, int s, int l, int a = 255);
0157 
0158     void getHslF(float *h, float *s, float *l, float *a = nullptr) const;
0159     void setHslF(float h, float s, float l, float a = 1.0);
0160 
0161     QColor toRgb() const noexcept;
0162     QColor toHsv() const noexcept;
0163     QColor toCmyk() const noexcept;
0164     QColor toHsl() const noexcept;
0165     QColor toExtendedRgb() const noexcept;
0166 
0167     [[nodiscard]] QColor convertTo(Spec colorSpec) const noexcept;
0168 
0169     static QColor fromRgb(QRgb rgb) noexcept;
0170     static QColor fromRgba(QRgb rgba) noexcept;
0171 
0172     static QColor fromRgb(int r, int g, int b, int a = 255);
0173     static QColor fromRgbF(float r, float g, float b, float a = 1.0);
0174 
0175     static QColor fromRgba64(ushort r, ushort g, ushort b, ushort a = USHRT_MAX) noexcept;
0176     static QColor fromRgba64(QRgba64 rgba) noexcept;
0177 
0178     static QColor fromHsv(int h, int s, int v, int a = 255);
0179     static QColor fromHsvF(float h, float s, float v, float a = 1.0);
0180 
0181     static QColor fromCmyk(int c, int m, int y, int k, int a = 255);
0182     static QColor fromCmykF(float c, float m, float y, float k, float a = 1.0);
0183 
0184     static QColor fromHsl(int h, int s, int l, int a = 255);
0185     static QColor fromHslF(float h, float s, float l, float a = 1.0);
0186 
0187     [[nodiscard]] QColor lighter(int f = 150) const noexcept;
0188     [[nodiscard]] QColor darker(int f = 200) const noexcept;
0189 
0190     bool operator==(const QColor &c) const noexcept;
0191     bool operator!=(const QColor &c) const noexcept;
0192 
0193     operator QVariant() const;
0194 
0195 #if QT_DEPRECATED_SINCE(6, 6)
0196     QT_DEPRECATED_VERSION_X_6_6("Use isValidColorName() instead.")
0197     static bool isValidColor(const QString &name);
0198     QT_DEPRECATED_VERSION_X_6_6("Use isValidColorName() instead.")
0199     static bool isValidColor(QStringView) noexcept;
0200     QT_DEPRECATED_VERSION_X_6_6("Use isValidColorName() instead.")
0201     static bool isValidColor(QLatin1StringView) noexcept;
0202 #endif
0203     static bool isValidColorName(QAnyStringView) noexcept;
0204 
0205 private:
0206 
0207     void invalidate() noexcept;
0208 
0209     static constexpr bool isRgbaValid(int r, int g, int b, int a = 255) noexcept Q_DECL_CONST_FUNCTION
0210     {
0211         return uint(r) <= 255 && uint(g) <= 255 && uint(b) <= 255 && uint(a) <= 255;
0212     }
0213 
0214     Spec cspec;
0215     union CT {
0216 #ifdef Q_COMPILER_UNIFORM_INIT
0217         CT() {} // doesn't init anything, thus can't be constexpr
0218         constexpr explicit CT(ushort a1, ushort a2, ushort a3, ushort a4, ushort a5) noexcept
0219             : array{a1, a2, a3, a4, a5} {}
0220 #endif
0221         struct {
0222             ushort alpha;
0223             ushort red;
0224             ushort green;
0225             ushort blue;
0226             ushort pad;
0227         } argb;
0228         struct {
0229             ushort alpha;
0230             ushort hue;
0231             ushort saturation;
0232             ushort value;
0233             ushort pad;
0234         } ahsv;
0235         struct {
0236             ushort alpha;
0237             ushort cyan;
0238             ushort magenta;
0239             ushort yellow;
0240             ushort black;
0241         } acmyk;
0242         struct {
0243             ushort alpha;
0244             ushort hue;
0245             ushort saturation;
0246             ushort lightness;
0247             ushort pad;
0248         } ahsl;
0249         struct {
0250             ushort alphaF16;
0251             ushort redF16;
0252             ushort greenF16;
0253             ushort blueF16;
0254             ushort pad;
0255         } argbExtended;
0256         ushort array[5];
0257     } ct;
0258 
0259     friend class QColormap;
0260 #ifndef QT_NO_DATASTREAM
0261     friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QColor &);
0262     friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &);
0263 #endif
0264 
0265 #ifdef Q_COMPILER_UNIFORM_INIT
0266 public: // can't give friendship to a namespace, so it needs to be public
0267     constexpr explicit QColor(Spec spec, ushort a1, ushort a2, ushort a3, ushort a4, ushort a5=0) noexcept
0268         : cspec(spec), ct(a1, a2, a3, a4, a5) {}
0269 #endif // Q_COMPILER_UNIFORM_INIT
0270 };
0271 Q_DECLARE_TYPEINFO(QColor, Q_RELOCATABLE_TYPE);
0272 
0273 inline QColor::QColor(QLatin1StringView aname)
0274     : QColor(fromString(aname)) {}
0275 
0276 inline QColor::QColor(QStringView aname)
0277     : QColor(fromString(aname)) {}
0278 
0279 inline QColor::QColor(const QString& aname)
0280     : QColor(fromString(aname)) {}
0281 
0282 inline QColor::QColor(const char *aname)
0283     : QColor(fromString(aname)) {}
0284 
0285 inline bool QColor::isValid() const noexcept
0286 { return cspec != Invalid; }
0287 
0288 namespace QColorConstants
0289 {
0290     // Qt::GlobalColor names
0291     constexpr inline QColor Color0      {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0292     constexpr inline QColor Color1      {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101};
0293     constexpr inline QColor Black       {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0294     constexpr inline QColor White       {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101};
0295     constexpr inline QColor DarkGray    {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
0296     constexpr inline QColor Gray        {QColor::Rgb, 0xff * 0x101, 0xa0 * 0x101, 0xa0 * 0x101, 0xa4 * 0x101};
0297     constexpr inline QColor LightGray   {QColor::Rgb, 0xff * 0x101, 0xc0 * 0x101, 0xc0 * 0x101, 0xc0 * 0x101};
0298     constexpr inline QColor Red         {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0299     constexpr inline QColor Green       {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0x00 * 0x101};
0300     constexpr inline QColor Blue        {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0xff * 0x101};
0301     constexpr inline QColor Cyan        {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0xff * 0x101};
0302     constexpr inline QColor Magenta     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101};
0303     constexpr inline QColor Yellow      {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101};
0304     constexpr inline QColor DarkRed     {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0305     constexpr inline QColor DarkGreen   {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
0306     constexpr inline QColor DarkBlue    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
0307     constexpr inline QColor DarkCyan    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
0308     constexpr inline QColor DarkMagenta {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
0309     constexpr inline QColor DarkYellow  {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
0310     constexpr inline QColor Transparent {QColor::Rgb, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0311 
0312     // SVG names supported by QColor (see qcolor.cpp).
0313 namespace Svg {
0314     constexpr inline QColor aliceblue                {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xf8 * 0x101, 0xff * 0x101};
0315     constexpr inline QColor antiquewhite             {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0xeb * 0x101, 0xd7 * 0x101};
0316     constexpr inline QColor aqua                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0xff * 0x101};
0317     constexpr inline QColor aquamarine               {QColor::Rgb, 0xff * 0x101, 0x7f * 0x101, 0xff * 0x101, 0xd4 * 0x101};
0318     constexpr inline QColor azure                    {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xff * 0x101, 0xff * 0x101};
0319     constexpr inline QColor beige                    {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xf5 * 0x101, 0xdc * 0x101};
0320     constexpr inline QColor bisque                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xe4 * 0x101, 0xc4 * 0x101};
0321     constexpr inline QColor black                    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0322     constexpr inline QColor blanchedalmond           {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xeb * 0x101, 0xcd * 0x101};
0323     constexpr inline QColor blue                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0xff * 0x101};
0324     constexpr inline QColor blueviolet               {QColor::Rgb, 0xff * 0x101, 0x8a * 0x101, 0x2b * 0x101, 0xe2 * 0x101};
0325     constexpr inline QColor brown                    {QColor::Rgb, 0xff * 0x101, 0xa5 * 0x101, 0x2a * 0x101, 0x2a * 0x101};
0326     constexpr inline QColor burlywood                {QColor::Rgb, 0xff * 0x101, 0xde * 0x101, 0xb8 * 0x101, 0x87 * 0x101};
0327     constexpr inline QColor cadetblue                {QColor::Rgb, 0xff * 0x101, 0x5f * 0x101, 0x9e * 0x101, 0xa0 * 0x101};
0328     constexpr inline QColor chartreuse               {QColor::Rgb, 0xff * 0x101, 0x7f * 0x101, 0xff * 0x101, 0x00 * 0x101};
0329     constexpr inline QColor chocolate                {QColor::Rgb, 0xff * 0x101, 0xd2 * 0x101, 0x69 * 0x101, 0x1e * 0x101};
0330     constexpr inline QColor coral                    {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x7f * 0x101, 0x50 * 0x101};
0331     constexpr inline QColor cornflowerblue           {QColor::Rgb, 0xff * 0x101, 0x64 * 0x101, 0x95 * 0x101, 0xed * 0x101};
0332     constexpr inline QColor cornsilk                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xf8 * 0x101, 0xdc * 0x101};
0333     constexpr inline QColor crimson                  {QColor::Rgb, 0xff * 0x101, 0xdc * 0x101, 0x14 * 0x101, 0x3c * 0x101};
0334     constexpr inline QColor cyan                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0xff * 0x101};
0335     constexpr inline QColor darkblue                 {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x8b * 0x101};
0336     constexpr inline QColor darkcyan                 {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x8b * 0x101, 0x8b * 0x101};
0337     constexpr inline QColor darkgoldenrod            {QColor::Rgb, 0xff * 0x101, 0xb8 * 0x101, 0x86 * 0x101, 0x0b * 0x101};
0338     constexpr inline QColor darkgray                 {QColor::Rgb, 0xff * 0x101, 0xa9 * 0x101, 0xa9 * 0x101, 0xa9 * 0x101};
0339     constexpr inline QColor darkgreen                {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x64 * 0x101, 0x00 * 0x101};
0340     constexpr inline QColor darkgrey                 {QColor::Rgb, 0xff * 0x101, 0xa9 * 0x101, 0xa9 * 0x101, 0xa9 * 0x101};
0341     constexpr inline QColor darkkhaki                {QColor::Rgb, 0xff * 0x101, 0xbd * 0x101, 0xb7 * 0x101, 0x6b * 0x101};
0342     constexpr inline QColor darkmagenta              {QColor::Rgb, 0xff * 0x101, 0x8b * 0x101, 0x00 * 0x101, 0x8b * 0x101};
0343     constexpr inline QColor darkolivegreen           {QColor::Rgb, 0xff * 0x101, 0x55 * 0x101, 0x6b * 0x101, 0x2f * 0x101};
0344     constexpr inline QColor darkorange               {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x8c * 0x101, 0x00 * 0x101};
0345     constexpr inline QColor darkorchid               {QColor::Rgb, 0xff * 0x101, 0x99 * 0x101, 0x32 * 0x101, 0xcc * 0x101};
0346     constexpr inline QColor darkred                  {QColor::Rgb, 0xff * 0x101, 0x8b * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0347     constexpr inline QColor darksalmon               {QColor::Rgb, 0xff * 0x101, 0xe9 * 0x101, 0x96 * 0x101, 0x7a * 0x101};
0348     constexpr inline QColor darkseagreen             {QColor::Rgb, 0xff * 0x101, 0x8f * 0x101, 0xbc * 0x101, 0x8f * 0x101};
0349     constexpr inline QColor darkslateblue            {QColor::Rgb, 0xff * 0x101, 0x48 * 0x101, 0x3d * 0x101, 0x8b * 0x101};
0350     constexpr inline QColor darkslategray            {QColor::Rgb, 0xff * 0x101, 0x2f * 0x101, 0x4f * 0x101, 0x4f * 0x101};
0351     constexpr inline QColor darkslategrey            {QColor::Rgb, 0xff * 0x101, 0x2f * 0x101, 0x4f * 0x101, 0x4f * 0x101};
0352     constexpr inline QColor darkturquoise            {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xce * 0x101, 0xd1 * 0x101};
0353     constexpr inline QColor darkviolet               {QColor::Rgb, 0xff * 0x101, 0x94 * 0x101, 0x00 * 0x101, 0xd3 * 0x101};
0354     constexpr inline QColor deeppink                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x14 * 0x101, 0x93 * 0x101};
0355     constexpr inline QColor deepskyblue              {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xbf * 0x101, 0xff * 0x101};
0356     constexpr inline QColor dimgray                  {QColor::Rgb, 0xff * 0x101, 0x69 * 0x101, 0x69 * 0x101, 0x69 * 0x101};
0357     constexpr inline QColor dimgrey                  {QColor::Rgb, 0xff * 0x101, 0x69 * 0x101, 0x69 * 0x101, 0x69 * 0x101};
0358     constexpr inline QColor dodgerblue               {QColor::Rgb, 0xff * 0x101, 0x1e * 0x101, 0x90 * 0x101, 0xff * 0x101};
0359     constexpr inline QColor firebrick                {QColor::Rgb, 0xff * 0x101, 0xb2 * 0x101, 0x22 * 0x101, 0x22 * 0x101};
0360     constexpr inline QColor floralwhite              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xfa * 0x101, 0xf0 * 0x101};
0361     constexpr inline QColor forestgreen              {QColor::Rgb, 0xff * 0x101, 0x22 * 0x101, 0x8b * 0x101, 0x22 * 0x101};
0362     constexpr inline QColor fuchsia                  {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101};
0363     constexpr inline QColor gainsboro                {QColor::Rgb, 0xff * 0x101, 0xdc * 0x101, 0xdc * 0x101, 0xdc * 0x101};
0364     constexpr inline QColor ghostwhite               {QColor::Rgb, 0xff * 0x101, 0xf8 * 0x101, 0xf8 * 0x101, 0xff * 0x101};
0365     constexpr inline QColor gold                     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xd7 * 0x101, 0x00 * 0x101};
0366     constexpr inline QColor goldenrod                {QColor::Rgb, 0xff * 0x101, 0xda * 0x101, 0xa5 * 0x101, 0x20 * 0x101};
0367     constexpr inline QColor gray                     {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
0368     constexpr inline QColor green                    {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
0369     constexpr inline QColor greenyellow              {QColor::Rgb, 0xff * 0x101, 0xad * 0x101, 0xff * 0x101, 0x2f * 0x101};
0370     constexpr inline QColor grey                     {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
0371     constexpr inline QColor honeydew                 {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xff * 0x101, 0xf0 * 0x101};
0372     constexpr inline QColor hotpink                  {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x69 * 0x101, 0xb4 * 0x101};
0373     constexpr inline QColor indianred                {QColor::Rgb, 0xff * 0x101, 0xcd * 0x101, 0x5c * 0x101, 0x5c * 0x101};
0374     constexpr inline QColor indigo                   {QColor::Rgb, 0xff * 0x101, 0x4b * 0x101, 0x00 * 0x101, 0x82 * 0x101};
0375     constexpr inline QColor ivory                    {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xf0 * 0x101};
0376     constexpr inline QColor khaki                    {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0xe6 * 0x101, 0x8c * 0x101};
0377     constexpr inline QColor lavender                 {QColor::Rgb, 0xff * 0x101, 0xe6 * 0x101, 0xe6 * 0x101, 0xfa * 0x101};
0378     constexpr inline QColor lavenderblush            {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xf0 * 0x101, 0xf5 * 0x101};
0379     constexpr inline QColor lawngreen                {QColor::Rgb, 0xff * 0x101, 0x7c * 0x101, 0xfc * 0x101, 0x00 * 0x101};
0380     constexpr inline QColor lemonchiffon             {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xfa * 0x101, 0xcd * 0x101};
0381     constexpr inline QColor lightblue                {QColor::Rgb, 0xff * 0x101, 0xad * 0x101, 0xd8 * 0x101, 0xe6 * 0x101};
0382     constexpr inline QColor lightcoral               {QColor::Rgb, 0xff * 0x101, 0xf0 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
0383     constexpr inline QColor lightcyan                {QColor::Rgb, 0xff * 0x101, 0xe0 * 0x101, 0xff * 0x101, 0xff * 0x101};
0384     constexpr inline QColor lightgoldenrodyellow     {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0xfa * 0x101, 0xd2 * 0x101};
0385     constexpr inline QColor lightgray                {QColor::Rgb, 0xff * 0x101, 0xd3 * 0x101, 0xd3 * 0x101, 0xd3 * 0x101};
0386     constexpr inline QColor lightgreen               {QColor::Rgb, 0xff * 0x101, 0x90 * 0x101, 0xee * 0x101, 0x90 * 0x101};
0387     constexpr inline QColor lightgrey                {QColor::Rgb, 0xff * 0x101, 0xd3 * 0x101, 0xd3 * 0x101, 0xd3 * 0x101};
0388     constexpr inline QColor lightpink                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xb6 * 0x101, 0xc1 * 0x101};
0389     constexpr inline QColor lightsalmon              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xa0 * 0x101, 0x7a * 0x101};
0390     constexpr inline QColor lightseagreen            {QColor::Rgb, 0xff * 0x101, 0x20 * 0x101, 0xb2 * 0x101, 0xaa * 0x101};
0391     constexpr inline QColor lightskyblue             {QColor::Rgb, 0xff * 0x101, 0x87 * 0x101, 0xce * 0x101, 0xfa * 0x101};
0392     constexpr inline QColor lightslategray           {QColor::Rgb, 0xff * 0x101, 0x77 * 0x101, 0x88 * 0x101, 0x99 * 0x101};
0393     constexpr inline QColor lightslategrey           {QColor::Rgb, 0xff * 0x101, 0x77 * 0x101, 0x88 * 0x101, 0x99 * 0x101};
0394     constexpr inline QColor lightsteelblue           {QColor::Rgb, 0xff * 0x101, 0xb0 * 0x101, 0xc4 * 0x101, 0xde * 0x101};
0395     constexpr inline QColor lightyellow              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xe0 * 0x101};
0396     constexpr inline QColor lime                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0x00 * 0x101};
0397     constexpr inline QColor limegreen                {QColor::Rgb, 0xff * 0x101, 0x32 * 0x101, 0xcd * 0x101, 0x32 * 0x101};
0398     constexpr inline QColor linen                    {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0xf0 * 0x101, 0xe6 * 0x101};
0399     constexpr inline QColor magenta                  {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101};
0400     constexpr inline QColor maroon                   {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0401     constexpr inline QColor mediumaquamarine         {QColor::Rgb, 0xff * 0x101, 0x66 * 0x101, 0xcd * 0x101, 0xaa * 0x101};
0402     constexpr inline QColor mediumblue               {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0xcd * 0x101};
0403     constexpr inline QColor mediumorchid             {QColor::Rgb, 0xff * 0x101, 0xba * 0x101, 0x55 * 0x101, 0xd3 * 0x101};
0404     constexpr inline QColor mediumpurple             {QColor::Rgb, 0xff * 0x101, 0x93 * 0x101, 0x70 * 0x101, 0xdb * 0x101};
0405     constexpr inline QColor mediumseagreen           {QColor::Rgb, 0xff * 0x101, 0x3c * 0x101, 0xb3 * 0x101, 0x71 * 0x101};
0406     constexpr inline QColor mediumslateblue          {QColor::Rgb, 0xff * 0x101, 0x7b * 0x101, 0x68 * 0x101, 0xee * 0x101};
0407     constexpr inline QColor mediumspringgreen        {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xfa * 0x101, 0x9a * 0x101};
0408     constexpr inline QColor mediumturquoise          {QColor::Rgb, 0xff * 0x101, 0x48 * 0x101, 0xd1 * 0x101, 0xcc * 0x101};
0409     constexpr inline QColor mediumvioletred          {QColor::Rgb, 0xff * 0x101, 0xc7 * 0x101, 0x15 * 0x101, 0x85 * 0x101};
0410     constexpr inline QColor midnightblue             {QColor::Rgb, 0xff * 0x101, 0x19 * 0x101, 0x19 * 0x101, 0x70 * 0x101};
0411     constexpr inline QColor mintcream                {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xff * 0x101, 0xfa * 0x101};
0412     constexpr inline QColor mistyrose                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xe4 * 0x101, 0xe1 * 0x101};
0413     constexpr inline QColor moccasin                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xe4 * 0x101, 0xb5 * 0x101};
0414     constexpr inline QColor navajowhite              {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xde * 0x101, 0xad * 0x101};
0415     constexpr inline QColor navy                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
0416     constexpr inline QColor oldlace                  {QColor::Rgb, 0xff * 0x101, 0xfd * 0x101, 0xf5 * 0x101, 0xe6 * 0x101};
0417     constexpr inline QColor olive                    {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
0418     constexpr inline QColor olivedrab                {QColor::Rgb, 0xff * 0x101, 0x6b * 0x101, 0x8e * 0x101, 0x23 * 0x101};
0419     constexpr inline QColor orange                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xa5 * 0x101, 0x00 * 0x101};
0420     constexpr inline QColor orangered                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x45 * 0x101, 0x00 * 0x101};
0421     constexpr inline QColor orchid                   {QColor::Rgb, 0xff * 0x101, 0xda * 0x101, 0x70 * 0x101, 0xd6 * 0x101};
0422     constexpr inline QColor palegoldenrod            {QColor::Rgb, 0xff * 0x101, 0xee * 0x101, 0xe8 * 0x101, 0xaa * 0x101};
0423     constexpr inline QColor palegreen                {QColor::Rgb, 0xff * 0x101, 0x98 * 0x101, 0xfb * 0x101, 0x98 * 0x101};
0424     constexpr inline QColor paleturquoise            {QColor::Rgb, 0xff * 0x101, 0xaf * 0x101, 0xee * 0x101, 0xee * 0x101};
0425     constexpr inline QColor palevioletred            {QColor::Rgb, 0xff * 0x101, 0xdb * 0x101, 0x70 * 0x101, 0x93 * 0x101};
0426     constexpr inline QColor papayawhip               {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xef * 0x101, 0xd5 * 0x101};
0427     constexpr inline QColor peachpuff                {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xda * 0x101, 0xb9 * 0x101};
0428     constexpr inline QColor peru                     {QColor::Rgb, 0xff * 0x101, 0xcd * 0x101, 0x85 * 0x101, 0x3f * 0x101};
0429     constexpr inline QColor pink                     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xc0 * 0x101, 0xcb * 0x101};
0430     constexpr inline QColor plum                     {QColor::Rgb, 0xff * 0x101, 0xdd * 0x101, 0xa0 * 0x101, 0xdd * 0x101};
0431     constexpr inline QColor powderblue               {QColor::Rgb, 0xff * 0x101, 0xb0 * 0x101, 0xe0 * 0x101, 0xe6 * 0x101};
0432     constexpr inline QColor purple                   {QColor::Rgb, 0xff * 0x101, 0x80 * 0x101, 0x00 * 0x101, 0x80 * 0x101};
0433     constexpr inline QColor red                      {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101};
0434     constexpr inline QColor rosybrown                {QColor::Rgb, 0xff * 0x101, 0xbc * 0x101, 0x8f * 0x101, 0x8f * 0x101};
0435     constexpr inline QColor royalblue                {QColor::Rgb, 0xff * 0x101, 0x41 * 0x101, 0x69 * 0x101, 0xe1 * 0x101};
0436     constexpr inline QColor saddlebrown              {QColor::Rgb, 0xff * 0x101, 0x8b * 0x101, 0x45 * 0x101, 0x13 * 0x101};
0437     constexpr inline QColor salmon                   {QColor::Rgb, 0xff * 0x101, 0xfa * 0x101, 0x80 * 0x101, 0x72 * 0x101};
0438     constexpr inline QColor sandybrown               {QColor::Rgb, 0xff * 0x101, 0xf4 * 0x101, 0xa4 * 0x101, 0x60 * 0x101};
0439     constexpr inline QColor seagreen                 {QColor::Rgb, 0xff * 0x101, 0x2e * 0x101, 0x8b * 0x101, 0x57 * 0x101};
0440     constexpr inline QColor seashell                 {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xf5 * 0x101, 0xee * 0x101};
0441     constexpr inline QColor sienna                   {QColor::Rgb, 0xff * 0x101, 0xa0 * 0x101, 0x52 * 0x101, 0x2d * 0x101};
0442     constexpr inline QColor silver                   {QColor::Rgb, 0xff * 0x101, 0xc0 * 0x101, 0xc0 * 0x101, 0xc0 * 0x101};
0443     constexpr inline QColor skyblue                  {QColor::Rgb, 0xff * 0x101, 0x87 * 0x101, 0xce * 0x101, 0xeb * 0x101};
0444     constexpr inline QColor slateblue                {QColor::Rgb, 0xff * 0x101, 0x6a * 0x101, 0x5a * 0x101, 0xcd * 0x101};
0445     constexpr inline QColor slategray                {QColor::Rgb, 0xff * 0x101, 0x70 * 0x101, 0x80 * 0x101, 0x90 * 0x101};
0446     constexpr inline QColor slategrey                {QColor::Rgb, 0xff * 0x101, 0x70 * 0x101, 0x80 * 0x101, 0x90 * 0x101};
0447     constexpr inline QColor snow                     {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xfa * 0x101, 0xfa * 0x101};
0448     constexpr inline QColor springgreen              {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0xff * 0x101, 0x7f * 0x101};
0449     constexpr inline QColor steelblue                {QColor::Rgb, 0xff * 0x101, 0x46 * 0x101, 0x82 * 0x101, 0xb4 * 0x101};
0450     constexpr inline QColor tan                      {QColor::Rgb, 0xff * 0x101, 0xd2 * 0x101, 0xb4 * 0x101, 0x8c * 0x101};
0451     constexpr inline QColor teal                     {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x80 * 0x101};
0452     constexpr inline QColor thistle                  {QColor::Rgb, 0xff * 0x101, 0xd8 * 0x101, 0xbf * 0x101, 0xd8 * 0x101};
0453     constexpr inline QColor tomato                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x63 * 0x101, 0x47 * 0x101};
0454     constexpr inline QColor turquoise                {QColor::Rgb, 0xff * 0x101, 0x40 * 0x101, 0xe0 * 0x101, 0xd0 * 0x101};
0455     constexpr inline QColor violet                   {QColor::Rgb, 0xff * 0x101, 0xee * 0x101, 0x82 * 0x101, 0xee * 0x101};
0456     constexpr inline QColor wheat                    {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xde * 0x101, 0xb3 * 0x101};
0457     constexpr inline QColor white                    {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101};
0458     constexpr inline QColor whitesmoke               {QColor::Rgb, 0xff * 0x101, 0xf5 * 0x101, 0xf5 * 0x101, 0xf5 * 0x101};
0459     constexpr inline QColor yellow                   {QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101};
0460     constexpr inline QColor yellowgreen              {QColor::Rgb, 0xff * 0x101, 0x9a * 0x101, 0xcd * 0x101, 0x32 * 0x101};
0461 }  // namespace Svg
0462 }  // namespace QColorLiterals
0463 
0464 QT_END_NAMESPACE
0465 
0466 #endif // QCOLOR_H