1Convert::Color::CMY(3)User Contributed Perl DocumentationConvert::Color::CMY(3)
2
3
4
6 "Convert::Color::CMY" - a color value represented as
7 cyan/magenta/yellow
8
10 Directly:
11
12 use Convert::Color::CMY;
13
14 my $red = Convert::Color::CMY->new( 0, 1, 1 );
15
16 # Can also parse strings
17 my $pink = Convert::Color::CMY->new( '0,0.3,0.3' );
18
19 Via Convert::Color:
20
21 use Convert::Color;
22
23 my $cyan = Convert::Color->new( 'cmy:1,0,0' );
24
26 Objects in this class represent a color in CMY space, as a set of three
27 floating-point values in the range 0 to 1.
28
30 $color = Convert::Color::CMY->new( $cyan, $magenta, $yellow )
31 Returns a new object to represent the set of values given. These values
32 should be floating-point numbers between 0 and 1. Values outside of
33 this range will be clamped.
34
35 $color = Convert::Color::CMY->new( $string )
36 Parses $string for values, and construct a new object similar to the
37 above three-argument form. The string should be in the form
38
39 cyan,magenta,yellow
40
41 containing the three floating-point values in decimal notation.
42
44 $c = $color->cyan
45 $m = $color->magenta
46 $y = $color->yellow
47 Accessors for the three components of the color.
48
49 ( $cyan, $magenta, $yellow ) = $color->cmy
50 Returns the individual cyan, magenta and yellow color components of the
51 color value.
52
54 · Convert::Color - color space conversions
55
56 · Convert::Color::RGB - a color value represented as red/green/blue
57
58 · Convert::Color::CMYK - a color value represented as
59 cyan/magenta/yellow/key
60
62 Paul Evans <leonerd@leonerd.org.uk>
63
64
65
66perl v5.12.3 2011-04-28 Convert::Color::CMY(3)