]> git.lyx.org Git - features.git/blobdiff - src/frontends/xforms/Color.h
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / xforms / Color.h
index 95186eabe73ee11c9c73d65b3bec424f6d11d68d..86a8de28813ae3dee25b420fc52efb8e521ab274 100644 (file)
@@ -6,7 +6,7 @@
  *
  * \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
@@ -17,7 +17,7 @@
 #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.
@@ -27,6 +27,8 @@ bool getRGBColor(LColor::color col,
                 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;
@@ -46,6 +48,8 @@ struct RGBColor {
        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 {