7 our @ISA = qw(Exporter DynaLoader);
18 SDL::Color - Format independent color description
22 my $black = SDL::Color->new( 0, 0, 0);
23 my $color = SDL::Color->new(255, 0, 0);
24 my $r = $color->r; # 255
25 my $g = $color->g; # 0
26 my $b = $color->b; # 0
33 C<SDL_Color> describes a color in a format independent way.
37 =head2 new ( $r, $g, $b )
39 The constructor creates a new color with the specified red, green and
42 my $color = SDL::Color->new(255, 0, 0);
46 If passed a value, this method sets the red component of the color;
47 if not, it returns the red component of the color:
49 my $r = $color->r; # 255
54 If passed a value, this method sets the green component of the color;
55 if not, it returns the green component of the color:
57 my $g = $color->g; # 255
62 If passed a value, this method sets the blue component of the color;
63 if not, it returns the blue component of the color:
65 my $b = $color->b; # 255