Graphics::ColorObject - A OO-Color Module.
A module for manipulation Colors within RGB, HSV and HSL color-spaces.
use Graphics::ColorObject; $cl = Graphics::ColorObject->new($colorname); $cl = Graphics::ColorObject->newRGB($r,$g,$b); $cl = Graphics::ColorObject->newHSV($h,$s,$v); $cl = Graphics::ColorObject->newHSL($h,$s,$l); $cl->setRGB($r,$g,$b); $cl->addBrightness($br); ($h,$s,$l) = $cl->asHSL;
Returns $cl's rgb values. Range [0 .. 1].
Returns $cl's hsv values. Ranges h [0 .. 360], s/v [0 .. 1].
Returns $cl's hsl values. Ranges h [0 .. 360], s/l [0 .. 1].
Returns $cl's grey value. Range [0 .. 1]. Functions 2 returns the geometric mean of the corresponding RGB values.
Returns $cl's cmy values. Range [0 .. 1].
Returns $cl's cmyk values. Range [0 .. 1]. Function 2 returns a 25% lighter color-equivalent. Function 3 returns a 25% lighter color-equivalent.
Returns $cl's rgb values as html's hex-digits.
Sets the $cl's rgb values. Valid range [0 .. 1].
Sets the $cl's hsv values. Valid ranges: h [0..360], s/v [0..1].
Sets the $cl's hsl values. Valid ranges: h [0..360], s/l [0..1].
Sets the $cl's grey value. Valid range [0 .. 1].
Sets the $cl's rgb values using 6 hex-nibbles.
Adds to the $cl's saturation in the HSV model. Valid range [-1 .. 1].
Sets the $cl's saturation in the HSV model. Valid range [0 .. 1].
Rotates the $cl's hue in the HSV/L model. Valid range [-360 .. 360].
Sets the $cl's hue in the HSV/L model. Valid range [0 .. 360].
Adds to the $cl's brightness in the HSV model. Valid range [-1 .. 1].
Sets the $cl's brightness in the HSV model. Valid range [0 .. 1].
Adds to the $cl's lightness in the HSL model. Valid range [-1 .. 1].
Sets the $cl's lightness in the HSL model. Valid range [0 .. 1].
Alfred Reibenschuh alfredreibenschuh@yahoo.com.
version 0.3a1 -- first public test release
Some ... please report them.
more color spaces ?
1 POD Error
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
To install Graphics::ColorObject, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Graphics::ColorObject
CPAN shell
perl -MCPAN -e shell install Graphics::ColorObject
For more information on module installation, please visit the detailed CPAN module installation guide.