On 05.11.2012, at 20:58, Laszlo Antal <lzan...@gmail.com> wrote: > Hi, > > On Nov 5, 2012, at 9:06, Doug Parks <marickstemp...@yahoo.com> wrote: > >>> Is it possible to compare the color of a widget in an "if" statement? If >>> so how would I go about doing it. I have tried using a standard comparison >>> but it says it is unable to do it. >>> >>> Thanks >>> Doug >> >> >> I figured it out. Sorry for the inconvenience. > > And your solution is?
Colors are unsigned int's (32 bit). The components are encoded RGBI where I is an index, or , if that is 0, RGB are 8bit color components. To get the RGB value from any color, use: static void Fl::get_color (Fl_Color i, uchar &red, uchar &green, uchar &blue) Returns the RGB value(s) for the given FLTK color index. and compare components _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk