Conver...or::CMY(3pm)
π Convert::Color::CMY β the manual, but make it cute π
okay bestie, so you found Convert::Color::CMY(3pm) and you're about to have the most aesthetically pleasing afternoon of your life, no cap. This is a Perl module that lets a color be a whole entire object. Let's get into it π
β¨ NAME β¨
"Convert::Color::CMY" β a color value represented as cyan/magenta/yellow. that's it, that's the vibe. π¦
πΈ SYNOPSIS πΈ
Directly, like you're walking in with main character energy:
use Convert::Color::CMY;
my $red = Convert::Color::CMY->new( 0, 1, 1 );
# Can also parse strings
my $pink = Convert::Color::CMY->new( '0,0.3,0.3' );
Or via Convert::Color, if you're feeling indirect (iconic behaviour tbh):
use Convert::Color;
my $cyan = Convert::Color->new( 'cmy:1,0,0' );
π DESCRIPTION π
Objects in this class represent a color in CMY space, as a set of three floating-point values in the range 0 to 1. Three little numbers, three little vibes, one gorgeous color. it's giving math but make it fashion β¨
π CONSTRUCTOR π
π§ new
$color = Convert::Color::CMY->new( $cyan, $magenta, $yellow );
Returns a new object to represent the set of values given. These values should be floating-point numbers between 0 and 1. Values outside of this range will be clamped β so if you try to get messy with 1.7, it's getting pulled back in line. no gatekeeping, just boundaries π
$color = Convert::Color::CMY->new( $string );
Parses $string for values, and construct a new object similar to the above three-argument form. The string should be in the form:
cyan,magenta,yellow
containing the three floating-point values in decimal notation. commas as separators, decimals as decimals, periodt. π
π«Ά METHODS π«Ά
π cyan
$c = $color->cyan;
π magenta
$m = $color->magenta;
π yellow
$y = $color->yellow;
Accessors for the three components of the color. three tiny little getters living their best lives π
π cmy
( $cyan, $magenta, $yellow ) = $color->cmy;
Returns the individual cyan, magenta and yellow color components of the color value. All three at once, in a list, in order β like a bestie group photo where everyone shows up π₯
π SEE ALSO π
Convert::Colorβ color space conversions. the parent friend of the whole friend group πConvert::Color::RGBβ a color value represented as red/green/blueConvert::Color::CMYKβ a color value represented as cyan/magenta/yellow/key
βοΈ AUTHOR βοΈ
Paul Evans <leonerd@leonerd.org.uk> β the legend, the moment, the icon π
and that's the whole page bestie!! this one came from perl v5.40.0, dated 2024-09-16 β shoutout to the manual itself, couldn't have done it without you ππβ¨ ly, go slay some colors π¦
π¦ where this page comes from
- ubuntu resolute: libconvert-color-perl 0.18-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libconvert-color-perl 0.18-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms