35 #ifndef COLOR_UTIL_TYPES_H 36 #define COLOR_UTIL_TYPES_H 47 : r(r), g(g), b(b), a(a) {}
51 return r == other.
r &&
g == other.
g &&
b == other.
b &&
a == other.
a;
58 return "(r: " + std::to_string(r) +
", g: " + std::to_string(b) +
59 ", b: " + std::to_string(g) +
", a: " + std::to_string(a) +
")";
67 : h(h), s(s), v(v), a(a) {}
71 return h == other.
h && s == other.
s && v == other.
v &&
a == other.
a;
78 return "(h: " + std::to_string(h) +
", s: " + std::to_string(s) +
79 ", v: " + std::to_string(v) +
", a: " + std::to_string(a) +
")";
85 explicit ColorRGBA(
double r = 0.0,
double g = 0.0,
double b = 0.0,
double a = 1.0)
91 explicit ColorRGBA24(
unsigned char r = 0,
unsigned char g = 0,
unsigned char b = 0,
unsigned char a = 255)
98 explicit ColorHSVA(
double h = 0.0,
double s = 0.0,
double v = 0.0,
double a = 1.0)
104 explicit ColorHSVA24(
unsigned char h = 0,
unsigned char s = 0,
unsigned char v = 0,
unsigned char a = 255)
110 #endif // COLOR_UTIL_TYPES_H
std::string toString() const
std::string toString() const
bool operator==(const GenericColorRGBA &other) const
ColorHSVA(double h=0.0, double s=0.0, double v=0.0, double a=1.0)
ColorRGBA24(unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=255)
GenericColorHSVA(T h, T s, T v, T a)
ColorHSVA24(unsigned char h=0, unsigned char s=0, unsigned char v=0, unsigned char a=255)
ColorRGBA(double r=0.0, double g=0.0, double b=0.0, double a=1.0)
bool operator==(const GenericColorHSVA &other) const
GenericColorRGBA(T r, T g, T b, T a)