1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>pango.Color</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="pango-class-reference.html" title="The pango Class Reference"><link rel="previous" href="class-pangoattrlist.html" title="pango.AttrList"><link rel="next" href="class-pangocontext.html" title="pango.Context"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">pango.Color</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-pangoattrlist.html">Prev</a></td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-pangocontext.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-pangocolor"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>pango.Color</h2><p>pango.Color — an object representing a RGB color</p></div><div class="refsect1" lang="en"><a name="id3044072"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.Color</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a href="class-pangocolor.html#method-pangocolor--parse" title="pango.Color.parse">parse</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>spec</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id2966566"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"red"</td><td valign="top">Read</td><td valign="top">The red component of the color with a value between 0
and 65535.</td></tr><tr valign="top"><td valign="top">"green"</td><td valign="top">Read</td><td valign="top">The green component of the color with a value between 0
and 65535.</td></tr><tr valign="top"><td valign="top">"blue"</td><td valign="top">Read</td><td valign="top">The blue component of the color with a value between 0
and 65535.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3212704"></a><h2>Description</h2><p>A <a href="class-pangocolor.html" title="pango.Color"><tt class="classname">pango.Color</tt></a> object
is a <a href="class-gobjectgboxed.html" title="gobject.GBoxed"><tt class="classname">gobject.GBoxed</tt></a>
type that represents a color with RGB components. Each component value
ranges from 0 to 65535.</p></div><div class="refsect1" lang="en"><a name="id3198333"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-pangocolor--parse"></a><h3>pango.Color.parse</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">parse</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>spec</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>spec</tt></i>:</span></td><td>a string specifying the new
color</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if
<i class="parameter"><tt>spec</tt></i> was successfully parsed</td></tr></tbody></table><p>The <tt class="methodname">parse</tt>() method fills in the color
attributes of the <a href="class-pangocolor.html" title="pango.Color"><tt class="classname">pango.Color</tt></a> from
the string <i class="parameter"><tt>spec</tt></i>. The string in
<i class="parameter"><tt>spec</tt></i> can either one of a large set of standard names.
(Taken from the X11 <tt class="filename">rgb.txt</tt> file), or it can be a hex
value in the form '<tt class="literal">rgb</tt>' '<tt class="literal">rrggbb</tt>'
'<tt class="literal">rrrgggbbb</tt>' or '<tt class="literal">rrrrggggbbbb</tt>' where
'r', 'g' and 'b' are hex digits of the red, green, and blue components of
the color, respectively. (White in the four forms is
'<tt class="literal">fff</tt>' '<tt class="literal">ffffff</tt>'
'<tt class="literal">fffffffff</tt>' and '<tt class="literal">ffffffffffff</tt>')</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-pangoattrlist.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="pango-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-pangocontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango.AttrList</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">pango.Context</td></tr></table></div></body></html>
|