I've just uploaded a new set of plugins for doing colour
manipulation
in RGB and HSV. It's on it's way to CPAN. In the mean time
you can
get it here:
http://wardley.org/perl/Template-Plugin-Colour-0.01.ta
r.gz
This also provides the Template::Plugin::Color (note
spelling) modules
for those who can't spell 'Colour' These are
just thin wrappers
of conveience around the corresponding 'Colour' modules.
Here's an example:
[% USE Colour; # or USE Color
orange = Colour.HSV(30, 255, 255); # or
Color.hsv(...)
lighter = orange.copy( saturation = 127 );
darker = orange.copy( value = 127 );
contrast = orange.copy( hue = 210 )
%]
[% orange.html %] => #ff7f00
[% lighter.html %] => #ffbf80
[% darker.html %] => #7f3f00
[% contrast.html %] => #007fff
Comments welcome.
A
_______________________________________________
templates mailing list
templates template-toolkit.org
http://lists.template-toolkit.org/mailman/listinfo/t
emplates
|