GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# gimppalette

## Name

gimppalette --

## Synopsis

    gboolean    gimp_palette_get_foreground     (guchar *red,
                                                 guchar *green,
                                                 guchar *blue);
    gboolean    gimp_palette_get_background     (guchar *red,
                                                 guchar *green,
                                                 guchar *blue);
    gboolean    gimp_palette_set_foreground     (guchar red,
                                                 guchar green,
                                                 guchar blue);
    gboolean    gimp_palette_set_background     (guchar red,
                                                 guchar green,
                                                 guchar blue);
    gboolean    gimp_palette_set_default_colors (void);
    gboolean    gimp_palette_swap_colors        (void);
    gboolean    gimp_palette_refresh            (void);

## Description

## Details

### gimp_palette_get_foreground ()

    gboolean    gimp_palette_get_foreground     (guchar *red,
                                                 guchar *green,
                                                 guchar *blue);

Get the current GIMP foreground color.

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.

`red` : |
`green` : |
`blue` : | The foreground color.
Returns : | TRUE on success.

### gimp_palette_get_background ()

    gboolean    gimp_palette_get_background     (guchar *red,
                                                 guchar *green,
                                                 guchar *blue);

Get the current GIMP background color.

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.

`red` : |
`green` : |
`blue` : | The background color.
Returns : | TRUE on success.

### gimp_palette_set_foreground ()

    gboolean    gimp_palette_set_foreground     (guchar red,
                                                 guchar green,
                                                 guchar blue);

Set the current GIMP foreground color.

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.

`red` : |
`green` : |
`blue` : | The foreground color.
Returns : | TRUE on success.

### gimp_palette_set_background ()

    gboolean    gimp_palette_set_background     (guchar red,
                                                 guchar green,
                                                 guchar blue);

Set the current GIMP background color.

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.

`red` : |
`green` : |
`blue` : | The background color.
Returns : | TRUE on success.

### gimp_palette_set_default_colors ()

    gboolean    gimp_palette_set_default_colors (void);

Set the current GIMP foreground and background colors to black and white.

This procedure sets the current GIMP foreground and background colors to their initial default values, black and white.

Returns : | TRUE on success.

### gimp_palette_swap_colors ()

    gboolean    gimp_palette_swap_colors        (void);

Swap the current GIMP foreground and background colors.

This procedure swaps the current GIMP foreground and background colors, so that the new foreground color becomes the old background color and vice versa.

Returns : | TRUE on success.

### gimp_palette_refresh ()

    gboolean    gimp_palette_refresh            (void);

Refreshes current palettes.

This procedure incorporates all palettes currently in the users palette path.

Returns : | TRUE on success.

<<< Previous Page | Home | Up | Next Page >>>
gimpmisc | gimppatterns