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">new</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></li>
19 <li><a href="#AUTHORS">AUTHORS</a>
24 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
25 <div id="NAME_CONTENT">
26 <p>SDL::Color - Format independent color description</p>
29 <h2 id="CATEGORY">CATEGORY</h2>
30 <div id="CATEGORY_CONTENT">
31 <p>Core, Video, Structure</p>
34 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
35 <div id="SYNOPSIS_CONTENT">
36 <pre> my $black = SDL::Color->new(0, 0, 0);
37 my $color = SDL::Color->new(255, 0, 0);
38 my $r = $color->r; # 255
39 my $g = $color->g; # 0
40 my $b = $color->b; # 0
48 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
49 <div id="DESCRIPTION_CONTENT">
50 <p><code>SDL_Color</code> describes a color in a format independent way.</p>
53 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
54 <div id="METHODS_CONTENT">
58 <div id="new_CONTENT">
59 <pre> my $color = SDL::Color->new(255, 0, 0);
62 <p>The constructor creates a new color with the specified red, green and blue values.</p>
67 <pre> my $r = $color->r;
71 <p>If passed a value, this method sets the red component of the color;
72 if not, it returns the red component of the color.</p>
77 <pre> my $g = $color->g;
81 <p>If passed a value, this method sets the green component of the color;
82 if not, it returns the green component of the color.</p>
87 <pre> my $b = $color->b;
91 <p>If passed a value, this method sets the blue component of the color;
92 if not, it returns the blue component of the color.</p>
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><a href="SDL-Surface.html">SDL::Surface</a></p>
100 <h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
101 <div id="AUTHORS_CONTENT">
102 <p>See <b>AUTHORS</b> in <cite>SDL</cite>.</p>