LEGO::Colors - Access to LEGO color information.
use LEGO::Color; use strict; my $green = LEGO::Color->new( name => 'green', red => 0, green => 255, blue => 0, ); # Or, more likely... my $green = LEGO::Colors->get_color('green');
This is a simple accessor class, used to store information about various different colors that LEGO pieces can have. Generally, you won't be creating these yourself -- they're just convenient ways to pass information back from the LEGO::Colors module. Please see that documentation for more information.
Constructs a new Color object. Takes 4 named parameters, all required. They are: name, red, blue and green, and hopefully self-explanatory. Returns undef if any parameters are missing or invalid.
Returns the name of this color object.
Returns the red value of this color object.
Returns the blue value of this color object.
Returns the green value of this color object.
A convenience method that returns all 3 red, green and blue values in a single hashref.
Returns an HTML color code, of the form "#XXYYZZ" that represents the RGB values of this color object.
None at this time.
Copyright 2007 Avi Finkel <avi@finkel.org>
This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)
LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this software. The official LEGO website is at http://www.lego.com/
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'LEGO®'. Assuming CP1252
To install LEGO::Colors, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LEGO::Colors
CPAN shell
perl -MCPAN -e shell install LEGO::Colors
For more information on module installation, please visit the detailed CPAN module installation guide.