Rand Stats

Color::Names

cpan:HOLLI

NAME

Color::Names - A comprehensive? list of named colors

SYNOPSIS

use Color::Names;

# a hash of normalized color names associated
# with rgb values and a pretty name
say Color.Names.color-data("X11");

# you can mix sets, the later one wins in case of
# name clashes
say Color.Names.color-data("X11", "XKCD");

use Color::Names::X11;
say Color::Names::X11.color-data{'Aqua'};
# --> { rgb => [0x00, 0xff, 0xff], name => 'Aqua' }

use Color::Data::CSS3 :colors;
say COLORS{'red'};
# --> { rgb => [0xff, 0x00, 0x00], name => Red' }

DESCRIPTION

You can choose from (currently) three color sets: X11, CSS3 and the xkcd set from the xkcd color survey.

The X11 and CSS3 sets are basically identical, except for 4 colors.

If you know about other lists of name/color pairs in use, please let me know.

AUTHOR

Markus «Holli» Holzer

COPYRIGHT AND LICENSE

Copyright © Markus Holzer ( holli.holzer@gmail.com )

License <GPLv3|: The GNU General Public License, Version 3, 29 June 2007

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.