See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu    External Links: The Gimp; Gimp User Manual

The Gimp palette functions

gimp_context_get_palette Retrieve the currently active palette.
gimp_context_set_palette Set the specified palette as the active palette.
gimp_palette_add_entry Adds a palette entry to the specified palette.
gimp_palette_delete Deletes a palette
gimp_palette_delete_entry Deletes a palette entry from the specified palette.
gimp_palette_duplicate Duplicates a palette
gimp_palette_entry_get_color Gets the specified palette entry from the specified palette.
gimp_palette_entry_get_name Gets the specified palette entry from the specified palette.
gimp_palette_entry_set_color Sets the specified palette entry in the specified palette.
gimp_palette_entry_set_name Sets the specified palette entry in the specified palette.
gimp_palette_get_background This procedure is deprecated! Use 'gimp_context_get_background' instead.
gimp_palette_get_columns Retrieves the number of columns to use to display this palette
gimp_palette_get_foreground This procedure is deprecated! Use 'gimp_context_get_foreground' instead.
gimp_palette_get_info Retrieve information about the specified palette.
gimp_palette_is_editable Tests if palette can be edited
gimp_palette_new Creates a new palette
gimp_palette_refresh This procedure is deprecated! Use 'gimp_palettes_refresh' instead.
gimp_palette_rename Rename a palette
gimp_palette_set_background This procedure is deprecated! Use 'gimp_context_set_background' instead.
gimp_palette_set_columns Sets the number of columns to use when displaying the palette
gimp_palette_set_default_colors This procedure is deprecated! Use 'gimp_context_set_default_colors' instead.
gimp_palette_set_foreground This procedure is deprecated! Use 'gimp_context_set_foreground' instead.
gimp_palette_swap_colors This procedure is deprecated! Use 'gimp_context_swap_colors' instead.
gimp_palettes_close_popup Popdown the Gimp palette selection.
gimp_palettes_get_list Retrieves a list of all of the available palettes
gimp_palettes_get_palette This procedure is deprecated! Use 'gimp_context_get_palette' instead.
gimp_palettes_get_palette_entry This procedure is deprecated! Use 'gimp_palette_entry_get_color' instead.
gimp_palettes_popup Invokes the Gimp palette selection.
gimp_palettes_refresh Refreshes current palettes. This function always succeeds.
gimp_palettes_set_palette This procedure is deprecated! Use 'gimp_context_set_palette' instead.
gimp_palettes_set_popup Sets the current palette selection in a popup.
plug_in_palettemap Map the contents of the specified drawable with the active palette
plug_in_smooth_palette derive smooth palette from image

gimp_palette_add_entry

Input:
STRINGnameThe palette name.
STRINGentry_nameThe name of the entry
COLORcolorThe new entry's color color
Returns:
INT32entry_numThe index of the added entry
This procedure adds an entry to the specifed palette. It returns an error if the entry palette does not exist.
Michael Natterer; 2004

gimp_palette_delete

Input:
STRINGnameThe palette name.
Returns: nothing
This procedure deletes a palette
Michael Natterer; 2004

gimp_palette_delete_entry

Input:
STRINGnameThe palette name.
INT32entry_numThe index of the added entry
Returns: nothing
This procedure deletes an entry from the specifed palette. It returns an error if the entry palette does not exist.
Michael Natterer; 2004

gimp_palette_duplicate

Input:
STRINGnameThe palette name.
Returns:
STRINGnameThe name of the palette's copy
This procedure creates an identical palette by a different name
Michael Natterer; 2004

gimp_palette_entry_get_color

Input:
STRINGnameThe palette name.
INT32entry_numThe entry to retrieve
Returns:
COLORcolorThe color requested
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.
Michael Natterer; 2004

gimp_palette_entry_get_name

Input:
STRINGnameThe palette name.
INT32entry_numThe entry to retrieve
Returns:
STRINGentry_nameThe name requested
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.
Michael Natterer; 2004

gimp_palette_entry_set_color

Input:
STRINGnameThe palette name.
INT32entry_numThe entry to retrieve
COLORcolorThe new color
Returns: nothing
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.
Michael Natterer; 2004

gimp_palette_entry_set_name

Input:
STRINGnameThe palette name.
INT32entry_numThe entry to retrieve
STRINGentry_nameThe new name
Returns: nothing
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.
Michael Natterer; 2004

gimp_palette_get_background

Input: none
Returns:
COLORbackgroundThe background color
This procedure is deprecated! Use 'gimp_context_get_background' instead.
;

gimp_palette_get_columns

Input:
STRINGnameThe palette name.
Returns:
INT32num_columnsThe number of columns used to display this palette
This procedures retrieves the prefered number of columns to use when the palette is being displayed.
Sven Neumann; 2005

gimp_palette_get_foreground

Input: none
Returns:
COLORforegroundThe foreground color
This procedure is deprecated! Use 'gimp_context_get_foreground' instead.
;

gimp_palette_get_info

Input:
STRINGnameThe palette name.
Returns:
INT32num_colorsThe number of colors in the palette
This procedure retrieves information about the specified palette. This includes the name, and the number of colors.
Michael Natterer; 2004

gimp_palette_is_editable

Input:
STRINGnameThe palette name.
Returns:
INT32editableTrue if the palette can be edited
Returns True if you have permission to change the palette
Bill Skaggs; 2004

gimp_palette_new

Input:
STRINGnameThe requested name of the new palette
Returns:
STRINGnameThe actual new palette name
This procedure creates a new, uninitialized palette
Michael Natterer; 2004

gimp_palette_refresh

Input: none
Returns: nothing
This procedure is deprecated! Use 'gimp_palettes_refresh' instead.
;

gimp_palette_rename

Input:
STRINGnameThe palette name.
STRINGnew_nameThe new name of the palette
Returns:
STRINGnameThe actual new name of the palette
This procedure renames a palette
Michael Natterer; 2004

gimp_palette_set_background

Input:
COLORbackgroundThe background color
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_background' instead.
;

gimp_palette_set_columns

Input:
STRINGnameThe palette name.
INT32columnsThe new number of columns
Returns: nothing
This procedures allows to control how many colors are shown per row when the palette is being displayed. This value can only be changed if the palette is writable. The maximum allowed value is 64.
Sven Neumann; 2005

gimp_palette_set_default_colors

Input: none
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_default_colors' instead.
;

gimp_palette_set_foreground

Input:
COLORforegroundThe foreground color
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_foreground' instead.
;

gimp_palette_swap_colors

Input: none
Returns: nothing
This procedure is deprecated! Use 'gimp_context_swap_colors' instead.
;

gimp_palettes_close_popup

Input:
STRINGpalette_callbackThe name of the callback registered for this popup
Returns: nothing
This procedure closes an opened palette selection dialog.
Michael Natterer; 2002

gimp_palettes_get_list

Input:
STRINGfilterAn optional regular expression used to filter the list
Returns:
INT32num_palettesThe number of palettes in the list
STRINGARRAYpalette_listThe list of palette names
This procedure returns a complete listing of available palettes. Each name returned can be used as input to the command 'gimp_context_set_palette'.
Nathan Summers; 2001

gimp_palettes_get_palette

Input: none
Returns:
STRINGnameThe palette name
INT32num_colorsThe palette num_colors
This procedure is deprecated! Use 'gimp_context_get_palette' instead.
;

gimp_palettes_get_palette_entry

Input:
STRINGnameThe palette name ("" means currently active palette)
INT32entry_numThe entry to retrieve
Returns:
STRINGnameThe palette name
INT32num_colorsThe palette num_colors
COLORcolorThe color requested
This procedure is deprecated! Use 'gimp_palette_entry_get_color' instead.
;

gimp_palettes_popup

Input:
STRINGpalette_callbackThe callback PDB proc to call when palette selection is made
STRINGpopup_titleTitle to give the palette popup window
STRINGinitial_paletteThe name of the palette to set as the first selected
Returns: nothing
This procedure popups the palette selection dialog.
Michael Natterer; 2002

gimp_palettes_refresh

Input: none
Returns: nothing
This procedure retrieves all palettes currently in the user's palette path and updates the palette dialogs accordingly.
Adrian Likins; 1998

gimp_palettes_set_palette

Input:
STRINGnameThe name of the palette
Returns: nothing
This procedure is deprecated! Use 'gimp_context_set_palette' instead.
;

gimp_palettes_set_popup

Input:
STRINGpalette_callbackThe name of the callback registered for this popup
STRINGpalette_nameThe name of the palette to set as selected
Returns: nothing
Sets the current palette selection in a popup.
Michael Natterer; 2002

plug_in_palettemap

Input:
INT32run_modeInteractive, non-interactive
IMAGEimageInput image (unused)
DRAWABLEdrawableInput drawable
Returns: nothing
This plug-in maps the contents of the specified drawable with the active palette. It calculates luminosity of each pixel and replaces the pixel by the palette sample at the corresponding index. A complete black pixel becomes the lowest palette entry, and complete white becomes the highest. Works on both Grayscale and RGB image with/without alpha channel.
Bill Skaggs; 2004

plug_in_smooth_palette

Input:
INT32run_modeInteractive, non-interactive
IMAGEimageInput image (unused)
DRAWABLEdrawableInput drawable
INT32widthWidth
INT32heightHeight
INT32ntriesSearch Depth
INT32show_imageShow Image?
Returns:
IMAGEnew_imageOutput image
LAYERnew_layerOutput layer
help!
Scott Draves; 1997


The Gimp 2.3.2 (win32)Documentation fresh from PDB22:53:15 Fr 22.07.2005
Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org>