Files
gimp/devel-docs/libgimp/html/libgimp-gimppalette.html
2010-08-11 01:16:22 -04:00

810 lines
25 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>gimppalette</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
<link rel="up" href="libgimp-data.html" title="Data Objects">
<link rel="prev" href="libgimp-gimpgradients.html" title="gimpgradients">
<link rel="next" href="libgimp-gimppalettes.html" title="gimppalettes">
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gimpdefinitions.html" title="Part&#160;I.&#160;GIMP Constants">
<link rel="part" href="libgimp.html" title="Part&#160;II.&#160;GIMP Library">
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
<link rel="part" href="libgimpui.html" title="Part&#160;III.&#160;GIMP User Interface Library">
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="libgimp-gimpgradients.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgimp-data.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIMP Library Reference Manual</th>
<td><a accesskey="n" href="libgimp-gimppalettes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry" lang="en">
<a name="libgimp-gimppalette"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">gimppalette</span></h2>
<p>gimppalette &#8212; Functions operating on a single palette.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
gchar* <a href="libgimp-gimppalette.html#gimp-palette-new">gimp_palette_new</a> (const gchar *name);
gchar* <a href="libgimp-gimppalette.html#gimp-palette-duplicate">gimp_palette_duplicate</a> (const gchar *name);
gchar* <a href="libgimp-gimppalette.html#gimp-palette-rename">gimp_palette_rename</a> (const gchar *name,
const gchar *new_name);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-delete">gimp_palette_delete</a> (const gchar *name);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-get-info">gimp_palette_get_info</a> (const gchar *name,
gint *num_colors);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-add-entry">gimp_palette_add_entry</a> (const gchar *name,
const gchar *entry_name,
const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *color,
gint *entry_num);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-delete-entry">gimp_palette_delete_entry</a> (const gchar *name,
gint entry_num);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-entry-get-color">gimp_palette_entry_get_color</a> (const gchar *name,
gint entry_num,
<a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *color);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-entry-set-color">gimp_palette_entry_set_color</a> (const gchar *name,
gint entry_num,
const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *color);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-entry-get-name">gimp_palette_entry_get_name</a> (const gchar *name,
gint entry_num,
gchar **entry_name);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-entry-set-name">gimp_palette_entry_set_name</a> (const gchar *name,
gint entry_num,
const gchar *entry_name);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-get-foreground">gimp_palette_get_foreground</a> (<a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *foreground);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-get-background">gimp_palette_get_background</a> (<a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *background);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-set-foreground">gimp_palette_set_foreground</a> (const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *foreground);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-set-background">gimp_palette_set_background</a> (const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *background);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-set-default-colors">gimp_palette_set_default_colors</a> (void);
gboolean <a href="libgimp-gimppalette.html#gimp-palette-swap-colors">gimp_palette_swap_colors</a> (void);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2629936"></a><h2>Description</h2>
<p>
Functions operating on a single palette.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2629947"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2629953"></a><h3>
<a name="gimp-palette-new"></a>gimp_palette_new ()</h3>
<a class="indexterm" name="id2629963"></a><pre class="programlisting">gchar* gimp_palette_new (const gchar *name);</pre>
<p>
Creates a new palette
</p>
<p>
This procedure creates a new, uninitialized palette</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The requested name of the new palette.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The actual new palette name.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2621858"></a><h3>
<a name="gimp-palette-duplicate"></a>gimp_palette_duplicate ()</h3>
<a class="indexterm" name="id2621867"></a><pre class="programlisting">gchar* gimp_palette_duplicate (const gchar *name);</pre>
<p>
Duplicates a palette
</p>
<p>
This procedure creates an identical palette by a different name</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The name of the palette's copy.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2621936"></a><h3>
<a name="gimp-palette-rename"></a>gimp_palette_rename ()</h3>
<a class="indexterm" name="id2621946"></a><pre class="programlisting">gchar* gimp_palette_rename (const gchar *name,
const gchar *new_name);</pre>
<p>
Rename a palette
</p>
<p>
This procedure renames a palette</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>new_name</code></em>&#160;:</span></td>
<td> The new name of the palette.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The actual new name of the palette.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2622035"></a><h3>
<a name="gimp-palette-delete"></a>gimp_palette_delete ()</h3>
<a class="indexterm" name="id2622046"></a><pre class="programlisting">gboolean gimp_palette_delete (const gchar *name);</pre>
<p>
Deletes a palette
</p>
<p>
This procedure deletes a palette</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2622113"></a><h3>
<a name="gimp-palette-get-info"></a>gimp_palette_get_info ()</h3>
<a class="indexterm" name="id2622122"></a><pre class="programlisting">gboolean gimp_palette_get_info (const gchar *name,
gint *num_colors);</pre>
<p>
Retrieve information about the specified palette.
</p>
<p>
This procedure retrieves information about the specified palette.
This includes the name, and the number of colors.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>num_colors</code></em>&#160;:</span></td>
<td> The number of colors in the palette.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2622215"></a><h3>
<a name="gimp-palette-add-entry"></a>gimp_palette_add_entry ()</h3>
<a class="indexterm" name="id2622224"></a><pre class="programlisting">gboolean gimp_palette_add_entry (const gchar *name,
const gchar *entry_name,
const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *color,
gint *entry_num);</pre>
<p>
Adds a palette entry to the specified palette.
</p>
<p>
This procedure adds an entry to the specifed palette. It returns an
error if the entry palette does not exist.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_name</code></em>&#160;:</span></td>
<td> The name of the entry.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> The new entry's color color.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_num</code></em>&#160;:</span></td>
<td> The index of the added entry.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2632129"></a><h3>
<a name="gimp-palette-delete-entry"></a>gimp_palette_delete_entry ()</h3>
<a class="indexterm" name="id2632138"></a><pre class="programlisting">gboolean gimp_palette_delete_entry (const gchar *name,
gint entry_num);</pre>
<p>
Deletes a palette entry from the specified palette.
</p>
<p>
This procedure deletes an entry from the specifed palette. It
returns an error if the entry palette does not exist.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_num</code></em>&#160;:</span></td>
<td> The index of the added entry.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2632230"></a><h3>
<a name="gimp-palette-entry-get-color"></a>gimp_palette_entry_get_color ()</h3>
<a class="indexterm" name="id2632239"></a><pre class="programlisting">gboolean gimp_palette_entry_get_color (const gchar *name,
gint entry_num,
<a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *color);</pre>
<p>
Gets the specified palette entry from the specified palette.
</p>
<p>
This procedure retrieves the color of the zero-based entry specifed
for the specified palette. It returns an error if the entry does not
exist.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_num</code></em>&#160;:</span></td>
<td> The entry to retrieve.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> The color requested.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2632353"></a><h3>
<a name="gimp-palette-entry-set-color"></a>gimp_palette_entry_set_color ()</h3>
<a class="indexterm" name="id2632362"></a><pre class="programlisting">gboolean gimp_palette_entry_set_color (const gchar *name,
gint entry_num,
const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *color);</pre>
<p>
Sets the specified palette entry in the specified palette.
</p>
<p>
This procedure sets the color of the zero-based entry specifed for
the specified palette. It returns an error if the entry does not
exist.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_num</code></em>&#160;:</span></td>
<td> The entry to retrieve.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> The new color.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2632476"></a><h3>
<a name="gimp-palette-entry-get-name"></a>gimp_palette_entry_get_name ()</h3>
<a class="indexterm" name="id2632485"></a><pre class="programlisting">gboolean gimp_palette_entry_get_name (const gchar *name,
gint entry_num,
gchar **entry_name);</pre>
<p>
Gets the specified palette entry from the specified palette.
</p>
<p>
This procedure retrieves the name of the zero-based entry specifed
for the specified palette. It returns an error if the entry does not
exist.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_num</code></em>&#160;:</span></td>
<td> The entry to retrieve.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_name</code></em>&#160;:</span></td>
<td> The name requested.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2632598"></a><h3>
<a name="gimp-palette-entry-set-name"></a>gimp_palette_entry_set_name ()</h3>
<a class="indexterm" name="id2632607"></a><pre class="programlisting">gboolean gimp_palette_entry_set_name (const gchar *name,
gint entry_num,
const gchar *entry_name);</pre>
<p>
Sets the specified palette entry in the specified palette.
</p>
<p>
This procedure sets the name of the zero-based entry specifed for
the specified palette. It returns an error if the entry does not
exist.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> The palette name.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_num</code></em>&#160;:</span></td>
<td> The entry to retrieve.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>entry_name</code></em>&#160;:</span></td>
<td> The new name.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2636484"></a><h3>
<a name="gimp-palette-get-foreground"></a>gimp_palette_get_foreground ()</h3>
<a class="indexterm" name="id2636492"></a><pre class="programlisting">gboolean gimp_palette_get_foreground (<a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *foreground);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gimp_palette_get_foreground</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Get the current GIMP foreground color.
</p>
<p>
This procedure retrieves the current GIMP foreground color. The
foreground color is used in a variety of tools such as paint tools,
blending, and bucket fill.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>foreground</code></em>&#160;:</span></td>
<td> The foreground color.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2636564"></a><h3>
<a name="gimp-palette-get-background"></a>gimp_palette_get_background ()</h3>
<a class="indexterm" name="id2636573"></a><pre class="programlisting">gboolean gimp_palette_get_background (<a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *background);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gimp_palette_get_background</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Get the current GIMP background color.
</p>
<p>
This procedure retrieves the current GIMP background color. The
background color is used in a variety of tools such as blending,
erasing (with non-alpha images), and image filling.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>background</code></em>&#160;:</span></td>
<td> The background color.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2636652"></a><h3>
<a name="gimp-palette-set-foreground"></a>gimp_palette_set_foreground ()</h3>
<a class="indexterm" name="id2636662"></a><pre class="programlisting">gboolean gimp_palette_set_foreground (const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *foreground);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gimp_palette_set_foreground</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Set the current GIMP foreground color.
</p>
<p>
This procedure sets the current GIMP foreground color. After this is
set, operations which use foreground such as paint tools, blending,
and bucket fill will use the new value.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>foreground</code></em>&#160;:</span></td>
<td> The foreground color.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2636741"></a><h3>
<a name="gimp-palette-set-background"></a>gimp_palette_set_background ()</h3>
<a class="indexterm" name="id2636751"></a><pre class="programlisting">gboolean gimp_palette_set_background (const <a
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
>GimpRGB</a> *background);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gimp_palette_set_background</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Set the current GIMP background color.
</p>
<p>
This procedure sets the current GIMP background color. After this is
set, operations which use background such as blending, filling
images, clearing, and erasing (in non-alpha images) will use the new
value.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>background</code></em>&#160;:</span></td>
<td> The background color.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2636830"></a><h3>
<a name="gimp-palette-set-default-colors"></a>gimp_palette_set_default_colors ()</h3>
<a class="indexterm" name="id2636841"></a><pre class="programlisting">gboolean gimp_palette_set_default_colors (void);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gimp_palette_set_default_colors</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Set the current GIMP foreground and background colors to black and
white.
</p>
<p>
This procedure sets the current GIMP foreground and background
colors to their initial default values, black and white.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2636902"></a><h3>
<a name="gimp-palette-swap-colors"></a>gimp_palette_swap_colors ()</h3>
<a class="indexterm" name="id2636910"></a><pre class="programlisting">gboolean gimp_palette_swap_colors (void);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gimp_palette_swap_colors</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Swap the current GIMP foreground and background colors.
</p>
<p>
This procedure swaps the current GIMP foreground and background
colors, so that the new foreground color becomes the old background
color and vice versa.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
<td align="left"><a accesskey="p" href="libgimp-gimpgradients.html"><b>&lt;&lt;&#160;gimpgradients</b></a></td>
<td align="right"><a accesskey="n" href="libgimp-gimppalettes.html"><b>gimppalettes&#160;&gt;&gt;</b></a></td>
</tr></table>
</body>
</html>