
Acme::Colour::Fuzzy - give names to arbitrary RGB triplets

# specify colour set, default is VACCC my $fuzzy = Acme::Colour::Fuzzy->new( 'VACCC' ); # list of similar colours, sorted by similarity my @approximations = $fuzzy->colour_approximations( $r, $g, $b, $count ); # made-up name for the colour my $name = $fuzzy->colour_name( $r, $g, $b );

This module uses sophisticated colour-distance metrics and some made-up computations to give a likely name to an arbitrary RGB triplet.

my $fuzzy = Acme::Colour::Fuzzy->new( $colour_set );
Creates a new Acme::Colour::Fuzzy object using the specified colour set. The coolour set can be any backend for Graphic::ColorNames with 'VACCC' as default.
my @approximations = $fuzzy->colour_approximations( $r, $g, $b, $count );
Returns a list of at most $count colours similar to the given one. Each element of the list is an hash with the following structure:
{ name => 'Red', # name taken from Graphics::ColourNames
distance => 7.1234567,
rgb => [ 255, 0, 0 ],
}
my $name = $fuzzy->colour_name( $r, $g, $b );
Makes up a colour name using the data computed by colour_approximations.


Mattia Barbon, <mbarbon@cpan.org>

Copyright (C) 2007, Mattia Barbon
This program is free software; you can redistribute it or modify it under the same terms as Perl itself.