-
-
17 Nov 2014 16:12:01 UTC
- Distribution: Convert-Color-Library
- Module version: 0.05
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (811 / 0 / 0)
- Kwalitee
Bus factor: 1- 94.51% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (12.54KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Color::Library
- Convert::Color
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Convert::Color::HTML
- color conversion usingColor::Library::Dictionary::HTML
SYNOPSIS
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;
DESCRIPTION
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.CONSTRUCTOR
$color = Convert::Color::HTML->new( $name )
Returns a new object to represent the named color from the
HTML
dictionary or plain RGB triplet.METHODS
$name = $color->name
Returns the name of the color instance; either the
HTML
dictionary name, or the plain RGB triplet notation, as was passed to the constructor.AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
Module Install Instructions
To install Convert::Color::Library, copy and paste the appropriate command in to your terminal.
cpanm Convert::Color::Library
perl -MCPAN -e shell install Convert::Color::Library
For more information on module installation, please visit the detailed CPAN module installation guide.