NAME
Color::Object
DESCRIPTION
A module for manipulation Colors within RGB, HSV and HSL color-spaces for usage within PDF-Documents especially with the Text::PDF::API modules.
SYNOPSIS
use Color::Object;
$cl = Color::Object->new;
$cl = Color::Object->newRGB($r,$g,$b);
$cl = Color::Object->newHSV($h,$s,$v);
$cl = Color::Object->newHSL($h,$s,$l);
$cl->setRGB($r,$g,$b);
$cl->addBrightness($br);
($h,$s,$l) = $cl->asHSL;
METHODS
- Color::Object->new
- Color::Object->newRGB $r, $g, $b
- Color::Object->newHSV $h, $s, $v
- Color::Object->newHSL $h, $s, $l
- Color::Object->newGrey $grey
- ( $r, $g, $b ) = $cl->asRGB
-
Returns $cl's rgb values. Range [0 .. 1].
- ( $h, $s, $v ) = $cl->asHSV
-
Returns $cl's hsv values. Ranges h [0 .. 360], s/v [0 .. 1].
- ( $h, $s, $l ) = $cl->asHSL
-
Returns $cl's hsl values. Ranges h [0 .. 360], s/l [0 .. 1].
- $grey = $cl->asGrey
-
Returns $cl's grey value. Range [0 .. 1].
- ( $c, $m, $y )= $cl->asCMY
-
Returns $cl's cmy values. Range [0 .. 1].
- ( $c, $m, $y, $k )= $cl->asCMYK
-
Returns $cl's cmyk values. Range [0 .. 1].
- $hex = $cl->asHex
-
Returns $cl's rgb values as 6 hex-digits.
- $cl->setRGB $r, $g, $b
-
Sets the $cl's rgb values. Valid range [0 .. 1].
- $cl->setHSV $h, $s, $v
-
Sets the $cl's hsv values. Valid ranges: h [0..360], s/v [0..1].
- $cl->setHSL $h, $s, $l
-
Sets the $cl's hsl values. Valid ranges: h [0..360], s/l [0..1].
- $cl->setGrey $grey
-
Sets the $cl's grey value. Valid range [0 .. 1].
- $cl->setHex $hex
-
Sets the $cl's rgb values using 6 hex-nibbles.
- $cl->addSaturation $saturation
-
Adds to the $cl's saturation in the HSV model. Valid range [-1 .. 1].
- $cl->setSaturation $saturation
-
Sets the $cl's saturation in the HSV model. Valid range [0 .. 1].
- $cl->rotHue $degrees
-
Rotates the $cl's hue in the HSV/L model. Valid range [-360 .. 360].
- $cl->setHue $hue
-
Sets the $cl's hue in the HSV/L model. Valid range [0 .. 360].
- $cl->addBrightness $brightness
-
Adds to the $cl's brightness in the HSV model. Valid range [-1 .. 1].
- $cl->setBrightness $brightness
-
Sets the $cl's brightness in the HSV model. Valid range [0 .. 1].
- $cl->addLightness $lightness
-
Adds to the $cl's lightness in the HSL model. Valid range [-1 .. 1].
- $cl->setLightness $lightness
-
Sets the $cl's lightness in the HSL model. Valid range [0 .. 1].
AUTHOR
Alfred Reibenschuh alfredreibenschuh@yahoo.com.
HISTORY
version 0.1_01 -- first public test release
BUGS
Some ... please report them.
TODO
more color spaces ?
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 175:
'=item' outside of any '=over'