3 <h3 id="TOP">Index</h3>
5 <ul><li><a href="#NAME">NAME</a>
6 <ul><li><a href="#CATEGORY">CATEGORY</a></li>
9 <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
10 <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
11 <li><a href="#METHODS">METHODS</a>
12 <ul><li><a href="#new_r_g_b">new ( $r, $g, $b )</a></li>
13 <li><a href="#r">r</a></li>
14 <li><a href="#g">g</a></li>
15 <li><a href="#b">b</a></li>
18 <li><a href="#SEE_ALSO">SEE ALSO</a>
23 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
24 <div id="NAME_CONTENT">
25 <p>SDL::Color - Format independent color description</p>
28 <h2 id="CATEGORY">CATEGORY</h2>
29 <div id="CATEGORY_CONTENT">
30 <p>Core, Video, Structure</p>
33 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
34 <div id="SYNOPSIS_CONTENT">
35 <pre> my $black = SDL::Color->new( 0, 0, 0);
36 my $color = SDL::Color->new(255, 0, 0);
37 my $r = $color->r; # 255
38 my $g = $color->g; # 0
39 my $b = $color->b; # 0
47 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
48 <div id="DESCRIPTION_CONTENT">
49 <p><code>SDL_Color</code> describes a color in a format independent way.</p>
52 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
53 <div id="METHODS_CONTENT">
56 <h2 id="new_r_g_b">new ( $r, $g, $b )</h2>
57 <div id="new_r_g_b_CONTENT">
58 <p>The constructor creates a new color with the specified red, green and
60 <pre> my $color = SDL::Color->new(255, 0, 0);
67 <p>If passed a value, this method sets the red component of the color;
68 if not, it returns the red component of the color:</p>
69 <pre> my $r = $color->r; # 255
77 <p>If passed a value, this method sets the green component of the color;
78 if not, it returns the green component of the color:</p>
79 <pre> my $g = $color->g; # 255
87 <p>If passed a value, this method sets the blue component of the color;
88 if not, it returns the blue component of the color:</p>
89 <pre> my $b = $color->b; # 255
95 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
96 <div id="SEE_ALSO_CONTENT">
97 <p><cite>SDL::Surface</cite></p>