<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-pangocolor">
  <refnamediv>
    <refname>pango.Color</refname>
    <refpurpose>an object representing a RGB color</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>pango.Color</classname></ooclass>
      <ooclass><classname>gobject.GBoxed</classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-pangocolor">pango.Color</link></methodname>
	<methodparam><parameter
		       role="keyword">spec</parameter></methodparam>
      </constructorsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Attributes</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	<?dbhtml cellpadding="5"?>
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"red"</entry>
	      <entry>Read</entry>
	      <entry>The red component of the color with a value between 0
and 65535.</entry>
	    </row>

	    <row valign="top">
	      <entry>"green"</entry>
	      <entry>Read</entry>
	      <entry>The green component of the color with a value between 0
and 65535.</entry>
	    </row>

	    <row valign="top">
	      <entry>"blue"</entry>
	      <entry>Read</entry>
	      <entry>The blue component of the color with a value between 0
and 65535.</entry>
	    </row>

	</tbody>
      </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-pangocolor"><classname>pango.Color</classname></link> object
is a <link
linkend="class-gobjectgboxed"><classname>gobject.GBoxed</classname></link>
type that represents a color with RGB components. Each component value
ranges from 0 to 65535.</para>

  </refsect1>

  <refsect1 id="constructor-pangocolor">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
        <methodname>pango.Color</methodname>
        <methodparam><parameter
                       role="keyword">spec</parameter></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
        <term><parameter>spec</parameter>&nbsp;:</term>
        <listitem><simpara>a string specifying the new
color</simpara></listitem>
      </varlistentry>
      <varlistentry>
        <term><emphasis>Returns</emphasis>&nbsp;:</term>
        <listitem><simpara>a new <link
linkend="class-pangocolor"><classname>pango.Color</classname></link>
object.</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-pangocolor"><classname>pango.Color</classname></link> using
the color attributes specified by the string
<parameter>spec</parameter>. The string in <parameter>spec</parameter> can
either one of a large set of standard names.  (Taken from the X11
<filename>rgb.txt</filename> file), or it can be a hex value in the form
'<literal>rgb</literal>' '<literal>rrggbb</literal>'
'<literal>rrrgggbbb</literal>' or '<literal>rrrrggggbbbb</literal>' 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
'<literal>fff</literal>' '<literal>ffffff</literal>'
'<literal>fffffffff</literal>' and '<literal>ffffffffffff</literal>')</para>

  </refsect1>

</refentry>
