On Aug 13, 2007, at 8:48 PM, Mariwan wrote: > As I understood (may be I am wrong!), > > inline Fl_Color fl_rgb_color(uchar g) > > return the 24 bit version of the "g" color. > But it is not working... >
Ian is right. fl_rgb_color(uchar g) returns the rrggbb00 representation of a shade of gray between 0 and 255. The function that you may be looking for is void Fl::get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue) which converts a color index into its red, green, and blue components, or unsigned Fl::get_color(Fl_Color i) which converts the indexed color into the packed FLTK rrggbb00 format, or fl_rgb_color(uchar r, uchar g, uchar b) which converts the color components into the packed FLTK rrggbb00 format. ---- http://robowerk.com/ _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

