4 * Copyright 1995 Matthias Ettrich
5 * This file is part of LyX, the document processor.
6 * Licence details can be found in the file COPYING.
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS
13 /* structs RGBColor and HSVColor to enable simple conversion between
32 HSVColor() : h(0.0), s(0.0), v(0.0) {}
33 HSVColor(double hue, double sat, double val)
34 : h(hue), s(sat), v(val) {}
35 HSVColor(RGBColor const &);
42 RGBColor() : r(0), g(0), b(0) {}
43 RGBColor(int red, int green, int blue)
44 : r(red), g(green), b(blue) {}
45 RGBColor(HSVColor const &);
48 struct NamedColor : public RGBColor {
50 NamedColor() : RGBColor() {}
51 NamedColor(string const & n, RGBColor const & c)
52 : RGBColor(c), name(n) {}
53 RGBColor const & color() const { return *this; }
54 string const & getname() const { return name; }
58 bool operator==(RGBColor const & c1, RGBColor const & c2)
60 return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
65 bool operator!=(RGBColor const & c1, RGBColor const & c2)