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

Template::Colour, Badger::Constants.