1Convert::Color::CMYK(3)User Contributed Perl DocumentatioCnonvert::Color::CMYK(3)
2
3
4
6 "Convert::Color::CMYK" - a color value represented as
7 cyan/magenta/yellow/key
8
10 Directly:
11
12 use Convert::Color::CMYK;
13
14 my $red = Convert::Color::CMYK->new( 0, 1, 1, 0 );
15
16 # Can also parse strings
17 my $pink = Convert::Color::CMYK->new( '0,0.3,0.3,0' );
18
19 Via Convert::Color:
20
21 use Convert::Color;
22
23 my $cyan = Convert::Color->new( 'cmyk:1,0,0,0' );
24
26 Objects in this class represent a color in CMYK space, as a set of four
27 floating-point values in the range 0 to 1.
28
30 new
31 $color = Convert::Color::CMYK->new( $cyan, $magenta, $yellow, $key )
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::CMYK->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,key
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 key
57 $k = $color->key
58
59 Accessors for the four components of the color.
60
61 black
62 $k = $color->black
63
64 An alias to "key"
65
66 cmyk
67 ( $cyan, $magenta, $yellow, $key ) = $color->cmyk
68
69 Returns the individual cyan, magenta, yellow and key components of the
70 color value.
71
73 • Convert::Color - color space conversions
74
75 • Convert::Color::CMY - a color value represented as
76 cyan/magenta/yellow
77
79 Paul Evans <leonerd@leonerd.org.uk>
80
81
82
83perl v5.36.0 2023-04-24 Convert::Color::CMYK(3)