Prima::ColorDialog - standard color selection facilities
The module contains two packages, Prima::ColorDialog and Prima::ColorComboBox, used as standard tools for interactive color selection. Prima::ColorComboBox is a modified combo widget, which provides selecting from predefined palette but also can invoke Prima::ColorDialog window.
Prima::ColorDialog
Prima::ColorComboBox
Used to increase visual quality of the dialog if run on paletted displays.
Default value: 0
Selects the color, represented by the color wheel and other dialog controls.
Default value: cl::White
cl::White
Converts color from HSV to RGB format and returns three integer values, red, green, and blue components.
Converts color from RGB to HSV format and returns three numerical values, hue, saturation, and luminosity components.
Combines separate channels into single 24-bit RGB value and returns the result.
Splits 24-bit RGB value into three channels, red, green, and blue and returns three integer values.
Maps X and Y coordinate values onto a color wheel with RADIUS in pixels. The code uses RADIUS = 119 for mouse position coordinate mapping. Returns three values, - hue, saturation and error flag. If error flag is set, the conversion has failed.
Maps hue and saturation onto 256-pixel wide color wheel, and returns X and Y coordinates of the corresponding point.
Creates a color wheel with number of SHADES given, drawn on a BACK_COLOR background, and returns a Prima::DeviceBitmap object.
Prima::DeviceBitmap
Creates a circular 1-bit mask, with radius derived from SHAPES. SHAPES must be same as passed to create_wheel. Returns Prima::Image object.
Prima::Image
Contains cached result of create_wheel call.
Contains cached result of create_wheel_shape call.
nt::Action callback, designed to map combo palette index into a RGB color. INDEX is an integer from 0 to colors - 1, COLOR_PTR is a reference to a result scalar, where the notification is expected to write the resulting color.
nt::Action
Defines amount of colors in the fixed palette of the combo box.
Contains the color selection as 24-bit integer value.
Prima, Prima::ComboBox, examples/cv.pl.
Dmitry Karasik, <dmitry@karasik.eu.org>.
To install Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prima
CPAN shell
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.