194 static bool hasAlpha(
const string& color);
202 static void splitARGB(
int argb,
int& a,
int& r,
int& g,
int& b);
210 static void splitRGB(
int rgb,
int& r,
int& g,
int& b);
216 static QColor
toQColor(
const string& color);
230 static string canonicalColorName(
const string& str);
236 static const std::map<string, int>& colorTable();
242 static const std::map<string, string>& colorNameTable();
245 static std::map<string, int> _colorTable;
246 static std::map<string, string> _colorNameTable;
static QColor toQColorARGB(int argb)
Converts an ARGB integer into a Qt color object.
Definition: gcolor.cpp:240
static bool hasAlpha(string color)
Returns true if the given color string is of the 8-hex-character form that contains an alpha channel ...
Definition: gcolor.cpp:210
static string convertARGBToColor(int a, int r, int g, int b)
Converts four integer RGB values from 0-255 into a color name in the form "#aarrggbb".
Definition: gcolor.cpp:103
static QColor toQColor(string color)
Converts a color string into a Qt color object.
Definition: gcolor.cpp:228
enum GColor::@0 Color
Constants representing common system color names.
static int convertColorToARGB(string colorName)
Converts a color name into an ARGB integer that encodes the alpha (opacity), red, green...
Definition: gcolor.cpp:122
static string convertRGBToColor(int rgb)
Converts an RGB integer value into a color name in the form "#rrggbb".
Definition: gcolor.cpp:154
static int convertQColorToRGB(const QColor &color)
Converts a Qt color object into an RGB integer.
Definition: gcolor.cpp:150
This class provides static methods for dealing with colors.
Definition: gcolor.h:70
static int convertRGBToRGB(int r, int g, int b)
Converts three integer RGB values from 0-255 into a single RGB integer.
Definition: gcolor.cpp:187
static int fixAlpha(int argb)
Sets the 'alpha' (high order bits) of the given integer to ff.
Definition: gcolor.cpp:191
static string convertQColorToColor(const QColor &color)
Converts a Qt RGB color object into a color string.
Definition: gcolor.cpp:146
static void splitARGB(int argb, int &a, int &r, int &g, int &b)
Splits the given ARGB integer into four integer RGB values from 0-255.
Definition: gcolor.cpp:215
static int convertARGBToARGB(int a, int r, int g, int b)
Converts four integer RGB values from 0-255 into an ARGB integer of the form 0xaarrggbb.
Definition: gcolor.cpp:99
static double getLuminance(int rgb)
Returns the photometric luminance of the given RGB integer, which is a measure of how bright the colo...
Definition: gcolor.cpp:199
static int convertColorToRGB(string colorName)
Converts a color name into an integer that encodes the red, green, and blue components of the color...
Definition: gcolor.cpp:126
static void splitRGB(int rgb, int &r, int &g, int &b)
Splits the given RGB integer into three integer RGB values from 0-255.
Definition: gcolor.cpp:222