|
NAMEColor::Library - An easy-to-use and comprehensive named-color library VERSIONversion 0.021 SYNOPSIS use Color::Library;
# Search for a sea blue color
my $seablue = Color::Library->color("seablue");
# Search for a grey73 in the 'svg' and 'x11' dictionaries only
my $grey73 = Color::Library->colour([qw/svg x11/] => "grey73");
# Find a bunch of colors at the same time
my ($red, $green, $blue) = Color::Library->colors(qw/red green blue/);
# Fetch the named color "aliceblue" from the SVG dictionary
my $color = Color::Library->SVG->color("aliceblue");
# Prints out "aliceblue is #ff08ff"
print $color->name, "is ", $color, "\n";
# Get a list of names in the svg dictionary
my @names = Color::Library->SVG->names;
# Get a list of colors in the x11 dictionary
my @colors = Color::Library->dictionary('x11')->colors;
DESCRIPTIONColor::Library is an easy-to-use and comprehensive named-color dictionary. Currently provides coverage for www (svg, html, css) colors, x11 colors, and more. DICTIONARIESThe following dictionaries are available in this distribution: Color::Library::Dictionary::SVG - Colors from the SVG specification
Color::Library::Dictionary::X11 - Colors for the X11 Window System (rgb.txt)
Color::Library::Dictionary::HTML - Colors from the HTML 4.0 specification
Color::Library::Dictionary::IE - Colors recognized by Internet Explorer
Color::Library::Dictionary::Mozilla - Colors recognized by Mozilla (ColorNames.txt)
Color::Library::Dictionary::Netscape - Colors recognized by Netscape
Color::Library::Dictionary::Windows - Colors from the Windows system palette
Color::Library::Dictionary::VACCC - VisiBone Anglo-Centric Color Code
Color::Library::Dictionary::NBS_ISCC - Centroids of the NBS/ISCC catalog
Color::Library::Dictionary::NBS_ISCC::A - Dye Colors
Color::Library::Dictionary::NBS_ISCC::B - Colour Terminology in Biology
Color::Library::Dictionary::NBS_ISCC::F - Colors; (for) Ready-Mixed Paints
Color::Library::Dictionary::NBS_ISCC::H - Horticultural Colour Charts
Color::Library::Dictionary::NBS_ISCC::M - Dictionary of Color
Color::Library::Dictionary::NBS_ISCC::P - Plochere Color System
Color::Library::Dictionary::NBS_ISCC::R - Color Standards and Color Nomenclature
Color::Library::Dictionary::NBS_ISCC::RC - Rock-Color Chart
Color::Library::Dictionary::NBS_ISCC::S - Postage-Stamp Color Names
Color::Library::Dictionary::NBS_ISCC::SC - Soil Color Charts
Color::Library::Dictionary::NBS_ISCC::TC - Standard Color Card of America
You can see a list of colors in any of these by reading their perldoc. For example: perldoc Color::Library::Dictionary::VACCC If you have any suggestions for more color dictionaries to integrate, contact me. METHODS
ABOUTThis package was inspired by Graphics::ColorNames, and covers much of the same ground. However, I found the Graphics::ColorNames interface difficult to use. I also wanted to list colors directly in the perldoc, which this package does. SEE ALSOGraphics::ColorNames AUTHORRobert Krimen <robertkrimen@gmail.com> COPYRIGHT AND LICENSEThis software is copyright (c) 2011 by Robert Krimen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|