2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 *======================================================*/
27 HSVColor() : h(0.0), s(0.0), v(0.0) {}
28 HSVColor(double hue, double sat, double val)
29 : h(hue), s(sat), v(val) {}
30 HSVColor(RGBColor const &);
37 RGBColor() : r(0), g(0), b(0) {}
38 RGBColor(int red, int green, int blue)
39 : r(red), g(green), b(blue) {}
40 RGBColor(HSVColor const &);
43 struct NamedColor : public RGBColor {
45 NamedColor() : RGBColor() {}
46 NamedColor(string const & n, RGBColor const & c)
47 : RGBColor(c), name(n) {}
48 RGBColor const & color() const { return *this; }
49 string const & getname() const { return name; }
53 bool operator==(RGBColor const & c1, RGBColor const & c2)
55 return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
60 bool operator!=(RGBColor const & c1, RGBColor const & c2)