FLTK 1.4.0
Loading...
Searching...
No Matches
fl_contrast.cxx File Reference

Color contrast handling. More...

#include <FL/Fl.H>
#include <math.h>

Functions

Fl_Color fl_contrast (Fl_Color fg, Fl_Color bg, Fl_Fontsize fs, int context)
 Returns a color that contrasts with the background color.
 
void fl_contrast_function (Fl_Contrast_Function *f)
 Register a custom contrast function.
 
int fl_contrast_level ()
 Get the contrast level (sensitivity) of the fl_contrast() method.
 
void fl_contrast_level (int level)
 Set the contrast level (sensitivity) of the fl_contrast() method.
 
int fl_contrast_mode ()
 Return the current contrast algorithm (mode).
 
void fl_contrast_mode (int mode)
 Set the contrast algorithm (mode).
 
double fl_lightness (Fl_Color color)
 Return the perceived lightness of a color.
 
double fl_luminance (Fl_Color color)
 Return the raw / physical luminance of a color.
 
unsigned get_color (Fl_Color i)
 

Variables

unsigned fl_cmap [256]
 

Detailed Description

Color contrast handling.

Implementation of fl_contrast() and its variants.