Conver...or::VGA(3pm)

πŸ’– Convert::Color::VGA β€” NAME ✨

okay bestie, so this one is "Convert::Color::VGA" and it's literally just a named lookup for the basic VGA colors πŸŽ€ like, you say a color name and it hands you the whole vibe. no cap.


🌈 SYNOPSIS 🌈

the direct way, just pull it in and go:

use Convert::Color::VGA;

my $red = Convert::Color::VGA->new( 'red' );

# Can also use index
my $black = Convert::Color::VGA->new( 0 );

orrr you can come through Convert::Color instead:

use Convert::Color;

my $cyan = Convert::Color->new( 'vga:cyan' );

both work, pick your fighter πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this subclass of Convert::Color::RGB comes with predefined colors for the 8 basic VGA colors. their names are, in order:

black
red
green
yellow
blue
magenta
cyan
white

and you can look them up either by name, or by numerical index within this list. that's it, that's the whole thing, iconic 🫢


✨ CONSTRUCTOR ✨

πŸŽ€ new

$color = Convert::Color::VGA->new( $name );

hands you back a new object representing the named color. cute.

$color = Convert::Color::VGA->new( $index );

hands you back a new object representing the color at the given index. also cute.


πŸ’… METHODS πŸ’…

πŸ“ index

$index = $color->index;

the index of the VGA color. yes queen, the number.

πŸ’œ name

$name = $color->name;

the name of the VGA color. the word itself. slay.


πŸ”₯ SEE ALSO πŸ”₯

  • Convert::Color β€” color space conversions

πŸ‘‘ AUTHOR πŸ‘‘

Paul Evans <leonerd@leonerd.org.uk>


okay that's the whole page, bestie, you're so welcome πŸ’– this was Conver...or::VGA(3pm) from the User Contributed Perl Documentation, perl v5.40.0, dated 2024-09-16 β€” mwah, go forth and color stuff πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from