+ rgbcol.r = gclr->get_red() / 256;
+ rgbcol.g = gclr->get_green() / 256;
+ rgbcol.b = gclr->get_blue() / 256;
+ return true;
+}
+
+
+string const lyx_gui::hexname(LColor_color col)
+{
+ lyx::RGBColor rgbcol;
+ if (!getRGBColor(col, rgbcol)) {
+ lyxerr << "X can't find color for \"" << lcolor.getLyXName(col)
+ << '"' << std::endl;
+ return string();
+ }
+
+ std::ostringstream os;
+