The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Chart::Clicker::Drawing::Color

DESCRIPTION

Chart::Clicker::Drawing::Color represents a Color in the sRGB color space. Used to make charts pertier.

The 16 colors defined by the W3C CSS specification are supported via the 'name' parameter of the constructor. The colors are aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow. Any case is fine, navy, NAVY or Navy.

SYNOPSIS

    use Chart::Clicker::Drawing::Color;

    my $color = new Chart::Clicker::Drawing::Color({
        red     => 1,
        blue    => .31,
        green   => .25,
        alpha   => 1
    });

    my $aqua = new Chart::Clicker::Drawing::Color({ name => 'aqua' });

METHODS

Constructor

new

Creates a new Chart::Clicker::Drawing::Color.

Class Methods

red

Set/Get the red component of this Color.

green

Set/Get the green component of this Color.

blue

Set/Get the blue component of this Color.

alpha

Set/Get the alpha component of this Color.

name

Get the name of this color. Only valid if the color was created by name.

as_string

Get a string version of this Color in the form of RED, GREEN, BLUE, ALPHA

clone

Clone this color

rgb

Get the RGB values as an array

rgba

Get the RGBA values as an array

Static Methods

names

Gets the list of predefined color names.

AUTHOR

Cory 'G' Watson <gphat@cpan.org>

SEE ALSO

perl(1)

LICENSE

You can redistribute and/or modify this code under the same terms as Perl itself.