Convert::Color::X11.3pm

Langue: en

Version: 2009-07-21 (ubuntu - 24/10/10)

Section: 3 (Bibliothèques de fonctions)

NAME

"Convert::Color::X11" - named lookup of colors from X11's rgb.txt

SYNOPSIS

Directly:
  use Convert::Color::X11;
 
  my $red = Convert::Color::X11->new( 'red' );
 
 

Via Convert::Color:

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

DESCRIPTION

This subclass of Convert::Color::RGB8 provides lookup of color names provided by X11's rgb.txt file.

CLASS METHODS

@colors = Convert::Color::X11->colors

Returns a list of the defined color names. This is a list of hash keys, so is returned in no particular order.

$num_colors = Convert::Color::X11->colors

When called in scalar context, this method returns the count of the number of defined colors.

CONSTRUCTOR

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

Returns a new object to represent the named color.

METHODS

$name = $color->name

The name of the VGA color.

SEE ALSO

Convert::Color - color space conversions

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>