-
-
22 Apr 2012 05:06:53 UTC
- Distribution: Template-Plugin-Colour
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (225 / 26 / 0)
- Kwalitee
Bus factor: 2- 65.10% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (17.28KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Badger
- Template
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Template::Colour::Constants - constants used by Template::Colour modules
SYNOPSIS
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
DESCRIPTION
This module is a simple subclass of Badger::Constants which defines some additional constants used by the Template::Colour modules.
CONSTANTS
You can export any of these constants by name. e.g.
use Template::Colour::Constants 'RED GREEN BLUE';
RED
Slot offset for red component in RGB colours (0).
GREEN
Slot offset for green component in RGB colours (1).
BLUE
Slot offset for blue component in RGB colours (2).
HUE
Slot offset for hue component in HSV colours (0).
SAT
Slot offset for saturation component in HSV colours (1).
VAL
Slot offset for value component in HSV colours (2).
SCHEME
Slot offset for any additional colour scheme defined for a colour (3).
BLACK
Hex representation of black:
#000000
. How much more black could this be? And the answer is none, none more black.WHITE
Hex representation of white:
#FFFFFF
.CONSTANT SETS
You can export related constants by specify the name of a constant tag set. e.g.
use Template::Colour::Constants ':RGB';
:RGB
RED, GREEN and BLUE.
:HSV
HUE, SAT and VAL.
AUTHOR
Andy Wardley <abw@cpan.org>, http://wardley.org
COPYRIGHT
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.
SEE ALSO
Module Install Instructions
To install Template::Plugin::Colour, copy and paste the appropriate command in to your terminal.
cpanm Template::Plugin::Colour
perl -MCPAN -e shell install Template::Plugin::Colour
For more information on module installation, please visit the detailed CPAN module installation guide.