Graphics::Color(3pm)

Graphics::Color3pm

Device and library agnostic color spaces.

Usage

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

Version

version 0.31

Overview

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).

Color types

The following color types are supported.

CMYK

HSL

HSV

RGB

YIQ

YUV

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.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7–8
  3. 9–10
  4. 11
  5. 12–13

Author

Cory G Watson <[email protected]>

From libgraphics-color-perl 0.31-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.