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
- Chart::Clicker::Drawing::Color->new({ red => $RED, green => $GREEN, blue => $BLUE, alpha => $ALPHA )
-
Creates a new Chart::Clicker::Drawing::Color.
Class Methods
- new( )
- $red = $c->red($red)
-
Set/Get the red component of this Color.
- $green = $c->green($green)
-
Set/Get the green component of this Color.
- $blue = $c->blue($blue)
-
Set/Get the blue component of this Color.
- $alpha = $c->alpha($alpha)
-
Set/Get the alpha component of this Color.
- $name = $c->name()
-
Get the name of this color. Only valid if the color was created by name.
- @names = $c->names()
-
Gets the list of predefined color names.
- as_string()
-
Get a string version of this Color in the form of RED, GREEN, BLUE, ALPHA
- $newcolor = $color->clone()
-
Clone this color
- @colors = rgb()
-
Get the RGB parts as an array
- @colors = rgba()
-
Get the RGBA parts as an array
AUTHOR
Cory 'G' Watson <gphat@onemogin.com>
SEE ALSO
perl(1)