Convert::Color::HTML - color conversion using
use Convert::Color::HTML; my $red = Convert::Color::HTML->new( 'red' ); my $blue = Convert::Color::HTML->new( '#0000FF' );
use Convert::Color; my $cyan = Convert::Color->new( 'html:cyan' );
Conversion from RGB:
my $green = Convert::Color::RGB->( 0, 1.0, 0 )->as_html; say "HTML colour name is " . $green->name;
This subclass of Convert::Color::Library provides a shortcut to performing library lookups specifically within the
HTML dictionary. Additionally it will parse
#RRGGBB color specifications.
Returns a new object to represent the named color from the
HTML dictionary or plain RGB triplet.
Returns the name of the color instance; either the
HTML dictionary name, or the plain RGB triplet notation, as was passed to the constructor.
Paul Evans <firstname.lastname@example.org>