6 our @ISA = qw(Exporter DynaLoader);
17 SDL::Color - Format independent color description
21 my $black = SDL::Color->new( 0, 0, 0);
22 my $color = SDL::Color->new(255, 0, 0);
23 my $r = $color->r; # 255
24 my $g = $color->g; # 0
25 my $b = $color->b; # 0
32 C<SDL_Color> describes a color in a format independent way.
36 =head2 new ( $r, $g, $b )
38 The constructor creates a new color with the specified red, green and
41 my $color = SDL::Color->new(255, 0, 0);
45 If passed a value, this method sets the red component of the color;
46 if not, it returns the red component of the color:
48 my $r = $color->r; # 255
53 If passed a value, this method sets the green component of the color;
54 if not, it returns the green component of the color:
56 my $g = $color->g; # 255
61 If passed a value, this method sets the blue component of the color;
62 if not, it returns the blue component of the color:
64 my $b = $color->b; # 255