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 new
31 $color = Convert::Color::CMY->new( $cyan, $magenta, $yellow )
32
33 Returns a new object to represent the set of values given. These values
34 should be floating-point numbers between 0 and 1. Values outside of
35 this range will be clamped.
36
37 $color = Convert::Color::CMY->new( $string )
38
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 cyan,magenta,yellow
43
44 containing the three floating-point values in decimal notation.
45
47 cyan
48 $c = $color->cyan
49
50 magenta
51 $m = $color->magenta
52
53 yellow
54 $y = $color->yellow
55
56 Accessors for the three components of the color.
57
58 cmy
59 ( $cyan, $magenta, $yellow ) = $color->cmy
60
61 Returns the individual cyan, magenta and yellow color components of the
62 color value.
63
65 • Convert::Color - color space conversions
66
67 • Convert::Color::RGB - a color value represented as red/green/blue
68
69 • Convert::Color::CMYK - a color value represented as
70 cyan/magenta/yellow/key
71
73 Paul Evans <leonerd@leonerd.org.uk>
74
75
76
77perl v5.34.1 2022-05-10 Convert::Color::CMY(3)