Subject: | Improper translation of names |
Your module works fine but I think that there should be way to force the map used for name conversions. For example if I want to work with HTML names only I would like to have something like this:
use Color::Calc;
my $color = Color::Calc::color_html('green');
my $backgound = Color::Calc::color_html('lime');
both commands does not behave as expected. The "green" name in HTML is #008000 (not #00ff00), and the "lime" color is #00ff00 but I've got the message "Unknown color 'lime' at...".
So I think that one could use some kind of option in Color::Calc to specify which names are accepted for input. For example:
use Color::Calc qw( :html ); # Use HTML input color names
use Color::Calc qw( :X ); # Use X11 input color names (default?)
use Color::Calc qw( :MyColorScheme) # Use
# Graphics::ColorNames::MyColorScheme
*** Color-Calc-0.20/Calc.pm 2004-03-29 02:10:08.000000000 +0200
--- Color-Calc-0.21/Calc.pm 2004-10-19 13:50:15.080682913 +0200
***************
*** 9,11 ****
! our $VERSION = '0.20';
$VERSION = eval $VERSION;
--- 9,11 ----
! our $VERSION = '0.21';
$VERSION = eval $VERSION;
***************
*** 29,31 ****
my %ColorNames = ();
! tie %ColorNames, 'Graphics::ColorNames';
--- 29,31 ----
my %ColorNames = ();
! tie %ColorNames, 'Graphics::ColorNames', 'HTML';