Template::Colour::Constants - constants used by Template::Colour modules
use Template::Colour::RGB; use Template::Colour::Constants ':RGB'; my $rgb = Template::Colour::RGB->new('#ff7f00'); # RED, GREEN and BLUE are the slot offsets in RGB colours print $rgb->[RED]; # 255 print $rgb->[GREEN]; # 127 print $rgb->[BLUE]; # 0
This module is a simple subclass of Badger::Constants which defines some additional constants used by the Template::Colour modules.
You can export any of these constants by name. e.g.
use Template::Colour::Constants 'RED GREEN BLUE';
Slot offset for red component in RGB colours (0).
Slot offset for green component in RGB colours (1).
Slot offset for blue component in RGB colours (2).
Slot offset for hue component in HSV colours (0).
Slot offset for saturation component in HSV colours (1).
Slot offset for value component in HSV colours (2).
Slot offset for any additional colour scheme defined for a colour (3).
Hex representation of black: #000000. How much more black could this be? And the answer is none, none more black.
#000000
Hex representation of white: #FFFFFF.
#FFFFFF
You can export related constants by specify the name of a constant tag set. e.g.
use Template::Colour::Constants ':RGB';
RED, GREEN and BLUE.
HUE, SAT and VAL.
Andy Wardley <abw@cpan.org>, http://wardley.org
Copyright (C) 2006-2012 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Template::Colour, Badger::Constants.
To install Template::Plugin::Colour, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::Colour
CPAN shell
perl -MCPAN -e shell install Template::Plugin::Colour
For more information on module installation, please visit the detailed CPAN module installation guide.