Acme-Colour-Fuzzy

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Acme::Colour::Fuzzy.

0.02  Sun Oct 14 19:06:42 CEST 2007
	- Use Color::Similarity as interface for determining
	  color similarity (default to Color::Similarity::HCL).

0.01  Sun Mar 11 12:31:04 CET 2007
	- First public release.

lib/Acme/Colour/Fuzzy.pm  view on Meta::CPAN

package Acme::Colour::Fuzzy;

=head1 NAME

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

=head1 SYNOPSIS

  # 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 );

=head1 DESCRIPTION

lib/Acme/Colour/Fuzzy.pm  view on Meta::CPAN

__PACKAGE__->mk_ro_accessors( qw(scheme colours) );

=head1 METHODS

=head2 new

  my $fuzzy = Acme::Colour::Fuzzy->new( $colour_set );

Creates a new C<Acme::Colour::Fuzzy> object using the specified colour
set.  The coolour set can be any backend for C<Graphic::ColorNames>
with 'VACCC' as default.

=cut

sub new {
    my( $class, $scheme, $distance ) = @_;
    $scheme ||= 'VACCC';
    $distance ||= 'Color::Similarity::HCL';

    my $similarity = Color::Similarity->new( $distance );



( run in 0.623 second using v1.01-cache-2.11-cpan-0a6323c29d9 )