FLTK logo

Re: how can I GET RGB values from FLTK-Elements?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.opengl  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: how can I GET RGB values from FLTK-Elements? Juergen Kertz Mar 16, 2006  
 

I found a little color mismatch:
(FLTK 1.1.7, WindowsXP - sorry i have to use it)
The above mentioned way for retrieving RGB works perfectly using the default scheme ("none"), the RGB-values from FL_BACKGROUND_COLOR are the ones you see on the desktop.
But using the "plastic" scheme shows a difference.
Putting the OpenGL-Window on an element eg "thin up-box" shows that FL_BACKGROUND_COLOR (number 49) does not fit.
Using Number 48 from the palette fits better, but is not correct.
So here is the way to correct it (for me).

Use number 48 from the palette to get RGB values. Then add 2 to the value. Then it should be correct.
here an example:
The original Windows "Desert"-scheme has the values:
r=207
g=197
b=178

get_color from number 48 gives you:
r=205
g=195
b=176

so you just have to add 2, and the values fit again.
(you might get into trouble with values above 254, but no usual color scheme uses that bright values)

I hope this helps someone.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.