2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 *======================================================*/
15 #include <utility> // for pair
30 HSVColor() : h(0.0), s(0.0), v(0.0) {}
31 HSVColor(double hue, double sat, double val) : h(hue), s(sat), v(val) {}
32 HSVColor( RGBColor const & );
39 RGBColor() : r(0), g(0), b(0) {}
40 RGBColor(int red, int green, int blue) : r(red), g(green), b(blue) {}
41 RGBColor( HSVColor const & );
44 typedef std::pair<string, RGBColor> X11Color;
46 /// struct holding xform-specific colors
51 XformColor() : colorID(0) {}
52 string const getname() { return name; }
53 static bool read( string const & );
54 static bool write( string const & );
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)