Convert::Color::VGA(3pm)

Convert::Color::VGA3pm

Named lookup for the basic vga colors

Usage

Directly:

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

Via Convert::Color:

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

Overview

This subclass of Convert::Color::RGB provides predefined colors for the 8 basic VGA colors. Their names are

   black
   red
   green
   yellow
   blue
   magenta
   cyan
   white

They may be looked up either by name, or by numerical index within this list.

Constructor

new

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

Returns a new object to represent the named color.

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

Returns a new object to represent the color at the given index.

Methods

index

   $index = $color->index;

The index of the VGA color.

name

   $name = $color->name;

The name of the VGA color.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7
  3. 8
  4. 9–10
  5. 11
  6. 12
  7. 13

Author

Paul Evans <[email protected]>

From libconvert-color-perl 0.18-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.