5 SDL::Color - Format independent color description
9 my $black = SDL::Color->new( 0, 0, 0);
10 my $color = SDL::Color->new(255, 0, 0);
11 my $r = $color->r; # 255
12 my $g = $color->g; # 0
13 my $b = $color->b; # 0
20 C<SDL_Color> describes a color in a format independent way.
24 =head2 new ( $r, $g, $b )
26 The constructor creates a new color with the specified red, green and
29 my $color = SDL::Color->new(255, 0, 0);
33 If passed a value, this method sets the red component of the color;
34 if not, it returns the red component of the color:
36 my $r = $color->r; # 255
41 If passed a value, this method sets the green component of the color;
42 if not, it returns the green component of the color:
44 my $g = $color->g; # 255
49 If passed a value, this method sets the blue component of the color;
50 if not, it returns the blue component of the color:
52 my $b = $color->b; # 255