Lightningbeam/PyGUI-2.5.3/Doc/Color.html

48 lines
1.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head><title>PyGUI - class Color</title>
<meta name="GENERATOR" content="Mozilla/3.01Gold (X11; I; SunOS 5.6 sun4u) [Netscape]"></head>
<body>
<h1>class <tt>Color</tt> </h1>
<p>A Color object is used to represent a color for drawing on a <a href="Canvas.html">Canvas</a>. Color objects are immutable.<br>
</p>
<p>Support for alpha values in colors is platform-dependent. On
platforms with no alpha support, alpha values always read as 1.0. Even
if colors with alpha are supported by a platform, alpha values may be
ignored by some operations.<br>
</p>
<h2>Constructor functions </h2>
<dl>
<dt><tt>rgb(</tt><i>red</i><tt>,</tt><i> green</i><tt>,</tt><i> blue</i><span style="font-family: monospace;">,</span> <span style="font-style: italic;">alpha</span> = 1.0<tt>)</tt></dt>
<dd>Returns a Color instance constructed from components in the RGB color space.
Each component should be in the range 0.0 to 1.0.<tt><br>
</tt></dd>
</dl>
<h2>Properties </h2>
<dl>
<dl>
<dt><tt>red </tt></dt>
<dt><tt>green </tt></dt>
<dt><tt>blue<br>
</tt></dt>
<dd><i>Read-only.</i> Components in the RGB color space, in the range
0.0 to 1.0.<br>
<br>
</dd><dt style="font-family: monospace;">alpha</dt>
<dd><i>Read-only. </i>Alpha (opacity) value of the color. 0.0 is fully transparent, 1.0 is fully opaque.<br>
<br>
</dd>
<dt style="font-family: monospace;">rgb</dt>
<dd><i>Read-only. </i>Components of the color as a tuple (<span style="font-style: italic;">red, green, blue</span>).<br>
<br>
</dd>
<dt style="font-family: monospace;">rgba</dt>
<dd><i>Read-only. </i>Components of the color as a tuple (<span style="font-style: italic;">red, green, blue, alpha</span>).</dd>
</dl>
</dl>
<br>
<br>
</body></html>