]> git.lyx.org Git - lyx.git/blobdiff - src/ColorCode.h
simplification
[lyx.git] / src / ColorCode.h
index 3feb992559d0482b554c033f34d14541878b6338..c3cbcfd34ba7ca65953fc16f7912d5fe125cf4a0 100644 (file)
@@ -156,6 +156,27 @@ enum ColorCode
        Color_ignore
 };
 
+
+struct RGBColor {
+       unsigned int r;
+       unsigned int g;
+       unsigned int b;
+       RGBColor() : r(0), g(0), b(0) {}
+       RGBColor(unsigned int red, unsigned int green, unsigned int blue)
+               : r(red), g(green), b(blue) {}
+};
+
+inline bool operator==(RGBColor const & c1, RGBColor const & c2)
+{
+       return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
+}
+
+
+inline bool operator!=(RGBColor const & c1, RGBColor const & c2)
+{
+       return !(c1 == c2);
+}
+
 } // namespace lyx
 
 #endif