3 <h3 id="TOP">Index</h3>
5 <ul><li><a href="#NAME">NAME</a></li>
6 <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
7 <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
8 <li><a href="#METHODS">METHODS</a>
9 <ul><li><a href="#new_r_g_b">new ( $r, $g, $b )</a></li>
10 <li><a href="#r">r</a></li>
11 <li><a href="#g">g</a></li>
12 <li><a href="#b">b</a></li>
15 <li><a href="#SEE_ALSO">SEE ALSO</a>
20 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
21 <div id="NAME_CONTENT">
22 <p>SDL::Color - Format independent color description</p>
25 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
26 <div id="SYNOPSIS_CONTENT">
27 <pre> my $black = SDL::Color->new( 0, 0, 0);
28 my $color = SDL::Color->new(255, 0, 0);
29 my $r = $color->r; # 255
30 my $g = $color->g; # 0
31 my $b = $color->b; # 0
39 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
40 <div id="DESCRIPTION_CONTENT">
41 <p><code>SDL_Color</code> describes a color in a format independent way.</p>
44 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
45 <div id="METHODS_CONTENT">
48 <h2 id="new_r_g_b">new ( $r, $g, $b )</h2>
49 <div id="new_r_g_b_CONTENT">
50 <p>The constructor creates a new color with the specified red, green and
52 <pre> my $color = SDL::Color->new(255, 0, 0);
59 <p>If passed a value, this method sets the red component of the color;
60 if not, it returns the red component of the color:</p>
61 <pre> my $r = $color->r; # 255
69 <p>If passed a value, this method sets the green component of the color;
70 if not, it returns the green component of the color:</p>
71 <pre> my $g = $color->g; # 255
79 <p>If passed a value, this method sets the blue component of the color;
80 if not, it returns the blue component of the color:</p>
81 <pre> my $b = $color->b; # 255
87 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
88 <div id="SEE_ALSO_CONTENT">
89 <p><cite>SDL::Surface</cite></p>