1Convert::Color::CMYK(3)User Contributed Perl DocumentatioCnonvert::Color::CMYK(3)
2
3
4

NAME

6       "Convert::Color::CMYK" - a color value represented as
7       cyan/magenta/yellow/key
8

SYNOPSIS

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

DESCRIPTION

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

CONSTRUCTOR

30   $color = Convert::Color::CMYK->new( $cyan, $magenta, $yellow, $key )
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::CMYK->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,key
40
41       containing the three floating-point values in decimal notation.
42

METHODS

44   $c = $color->cyan
45   $m = $color->magenta
46   $y = $color->yellow
47   $k = $color->key
48       Accessors for the four components of the color.
49
50   $k = $color->black
51       An alias to "key"
52
53   ( $cyan, $magenta, $yellow, $key ) = $color->cmyk
54       Returns the individual cyan, magenta, yellow and key components of the
55       color value.
56

SEE ALSO

58       ·   Convert::Color - color space conversions
59
60       ·   Convert::Color::CMY - a color value represented as
61           cyan/magenta/yellow
62

AUTHOR

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