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/blue
  • Convert::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