FLTK::ColorChooser - Color chooser for the Fast Light Tool Kit
The color chooser object and the color chooser popup. The popup is just a window containing a single color chooser and some boxes to indicate the current and cancelled color.
my $okay = $colorchooser->color_chooser( $name, $r, $g, $b );
FLTK::color_chooser() pops up a window to let the user pick an arbitrary RGB color.
They can pick the hue and saturation in the "hue box" on the left (hold down
CTRL to just change the saturation),
and the brighness using the vertical slider.
Or they can type the 8-bit numbers into the RGB FLTK::ValueInput fields,
or drag the mouse across them to adjust them.
The pull-down menu lets the user set the input fields to show RGB,
or 8-bit RGB (0 to 255).
This returns non-zero if the user picks ok, and updates the RGB values. If the user picks cancel or closes the window this returns zero and leaves RGB unchanged.
This version takes and returns numbers in the 0-1 range.
If you which to embed a color chooser into another control panel, use an FLTK::ColorChooser object.
my $okay = $colorchooser->color_chooser( $name, $r, $g, $b, $a );
Same but user can also select an alpha value. Currently the color chips do not remember or set the alpha!
my $okay = $colorchooser->color_chooser( $name, $color );
Same but it takes and returns an FLTK::Color number. No alpha.
Sanko Robinson <firstname.lastname@example.org> - http://sankorobinson.com/
Copyright (C) 2008-2010 by Sanko Robinson <email@example.com>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.