*
* \author Angus Leeming
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
/* structs RGBColor and HSVColor to enable simple conversion between
#define COLOR_H
-#include "LString.h"
+#include "support/std_string.h"
#include "LColor.h"
/** Given col, fills r, g, b in the range 0-255.
unsigned int & r, unsigned int & g, unsigned int & b);
struct RGBColor;
+/// returns a string of form #rrggbb, given an RGBColor struct
+string const X11hexname(RGBColor const & col);
struct HSVColor {
double h;
RGBColor(unsigned int red, unsigned int green, unsigned int blue)
: r(red), g(green), b(blue) {}
RGBColor(HSVColor const &);
+ /// \param x11hexname is of the form "#ffa071"
+ RGBColor(string const & x11hexname);
};
struct NamedColor : public RGBColor {