1Convert::Color::HSV(3)User Contributed Perl DocumentationConvert::Color::HSV(3)
2
3
4

NAME

6       "Convert::Color::HSV" - a color value represented as
7       hue/saturation/value
8

SYNOPSIS

10       Directly:
11
12        use Convert::Color::HSV;
13
14        my $red = Convert::Color::HSV->new( 0, 1, 1 );
15
16        # Can also parse strings
17        my $pink = Convert::Color::HSV->new( '0,0.7,1' );
18
19       Via Convert::Color:
20
21        use Convert::Color;
22
23        my $cyan = Convert::Color->new( 'hsv:300,1,1' );
24

DESCRIPTION

26       Objects in this class represent a color in HSV space, as a set of three
27       floating-point values. Hue is stored as a value in degrees, in the
28       range 0 to 360 (exclusive). Saturation and value are in the range 0 to
29       1.
30

CONSTRUCTOR

32   $color = Convert::Color::HSV->new( $hue, $saturation, $value )
33       Returns a new object to represent the set of values given. The hue
34       should be in the range 0 to 360 (exclusive), and saturation and value
35       should be between 0 and 1. Values outside of these ranges will be
36       clamped.
37
38   $color = Convert::Color::HSV->new( $string )
39       Parses $string for values, and construct a new object similar to the
40       above three-argument form. The string should be in the form
41
42        hue,saturation,value
43
44       containing the three floating-point values in decimal notation.
45

METHODS

47   $h = $color->hue
48   $s = $color->saturation
49   $v = $color->value
50       Accessors for the three components of the color.
51
52   ( $hue, $saturation, $value ) = $color->hsv
53       Returns the individual hue, saturation and value components of the
54       color value.
55

SEE ALSO

57       ·   Convert::Color - color space conversions
58
59       ·   Convert::Color::RGB - a color value represented as red/green/blue
60

AUTHOR

62       Paul Evans <leonerd@leonerd.org.uk>
63
64
65
66perl v5.12.3                      2011-04-28            Convert::Color::HSV(3)
Impressum