logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Graphics::Color - Device and library agnostic color spaces.

Author

       Cory G Watson <gphat@cpan.org>

Color Types

       The following color types are supported.

       CMYK

       HSL

       HSV

       RGB

       YIQ

       YUV

Description

       Graphics color is a device and library agnostic system for creating and manipulating colors in various
       color spaces.

Disclaimer

       I'm not an art student or a wizard of arcane color knowledge.  I'm a normal programmer with a penchant
       for things graphical.  Hence this module is likely incomplete in some places.  Patches are encouraged.
       I've intentions of adding more color spaces as well as conversion routines (where applicable).

Methods

derive
       Clone this color but allow one of more of it's attributes to change by passing in a hashref of options:

         my $new = $color->derive({ attr => $newvalue });

       The returned color will be identical to the cloned one, save the attributes specified.

   equal_to
       Compares this color to the provided one.  Returns 1 if true, else 0;

   not_equal_to
       The opposite of equal_to.

Name

       Graphics::Color - Device and library agnostic color spaces.

Synopsis

         my $color = Graphics::Color::RGB->new(
             red => .5, green => .5, blue => .5, alpha => .5
         );
         say $color->as_string;

Version

       version 0.31

See Also