Convert::Color::HTML - color conversion using Color::Library::Dictionary::HTML
Convert::Color::HTML
Color::Library::Dictionary::HTML
Directly:
use Convert::Color::HTML; my $red = Convert::Color::HTML->new( 'red' ); my $blue = Convert::Color::HTML->new( '#0000FF' );
Via Convert::Color:
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.
HTML
#RRGGBB
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 <leonerd@leonerd.org.uk>
To install Convert::Color::Library, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Convert::Color::Library
CPAN shell
perl -MCPAN -e shell install Convert::Color::Library
For more information on module installation, please visit the detailed CPAN module installation guide.