On 04/12/17 04:21,
holm.h...@gmail.com wrote:
> When my application is used by night, the user wants to dim the light,
> he want to make the screen darker. When sun rises, the colors should be back to normal again..
I'd think the easiest way to bring the colors of the whole
app down would be to bring down the brightness of the entire
color map using Fl::set_color() for not just the background,
but for all colors in the 8 bit colormap: 0 - 255.
You can 'snapshot' the startup colormap (at the top of main,
or after the Fl::show(argc,argv), as I think that can affect
the colormap used) using Fl::get_color() and keep the rgb values
of all 256 colors in an array, e.g. rgb[256][3]. Then, as it gets
'dark' out, apply a scaled down version of that array using Fl::set_color().
That'd hit the entire application; menus, fonts, etc.