Color constants and functions
Color:average | Color:get_color | Color:inactive | ||
Color:find_color_cube | Color:gray_ramp | Color:set_color | ||
FLTK manages colors via a fixed palette indexed by small integers. Color provides named colors and functions for manipulating them.
Here are the named colors:
Returns a gray color. Returns black for zero, returns white for
Color.num_gray (which is 24) minus 1. To get the closest to
an 8-bit gray value 'I' use
Color.gray_ramp(I*Color.num_gray/256).
Returns a color out of the color cube.
r must be in the range 0 to Color.num_red (5) minus 1.
g must be in the range 0 to Color.num_green (8) minus 1.
b must be in the range 0 to Color.num_blue (5) minus 1.
To get the closest color to a 8-bit set of R,G,B values use
Color.find_color_cube(R*Color.num_red/256, G*Color.num_green/256,
B*Color.num_blue/256).
Returns the Color substituted for c when it's drawn in an inactive widget.
Find the closest Color to the average of c1 and
c2, giving c1 a weight of weight.
Sets an entry in the fl_color index table. You can set it
to any 8-bit RGB color. (The color is not actually allocated until
the Fltk function fl_color(i) is used.)
Returns the RGB value for the given FLTK Color.
Color:find_color_cube(integer r, integer g, integer b): Color
Color:inactive(Color c): Color
Color:average(Color c1, Color c2, number weight): Color
Color:set_color(integer r, integer g, integer b): void
Color:get_color(Color c): integer r, integer g, integer b
doctool generated at Sun Aug 5 20:52:29 2001