On 13 Aug 2007, at 19:14, Mariwan wrote:

> I get a strange behavior. Shouldn't
>
>
> window->color(fl_rgb_color( 50) );
>
> and
>
> window->color(50);
>
> give the same color?

No, I don't think so - if I read the docs right (and I may very well  
be wrong!) then:

Fl_Color fl_rgb_color(uchar g);
Returns the 24-bit RGB color value for the specified 8-bit grayscale  
value (some shade of gray I imagine), whereas window->color(50);  
picks a colour from the fltk color-cube, whichever one has index 50,  
which is, erm, FL_LIGHT1 as far as I can see - which I guess by  
chance might be a shade of gray too, but probably a different one!

-- 

Ian


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to