### Class

# Gimp Palette

#### Description [src]

    final class Gimp.Palette : Gimp.Resource
      implements Gimp.ConfigInterface {
      /* No available fields */
    }

Installable object, a small set of colors a user can choose from.

#### Ancestors

- GimpResource
- GObject

#### Implements

- GimpConfigInterface

#### Constructors

###### gimp_palette_new

Creates a new palette.

since: 2.2

#### Functions

###### gimp_palette_get_by_name

Returns the palette with the given name.

since: 3.0

#### Instance methods

###### gimp_palette_add_entry

Appends an entry to the palette.

since: 2.2

###### gimp_palette_delete_entry

Deletes an entry from the palette.

since: 2.2

###### gimp_palette_get_color_count

Get the count of colors in the palette.

since: 2.2

###### gimp_palette_get_colormap

This procedure returns a palette’s colormap as an array of bytes with all colors converted to a given Babl `format`.

since: 3.0

###### gimp_palette_get_colors

Gets colors in the palette.

since: 2.6

###### gimp_palette_get_columns

Gets the number of columns used to display the palette.

since: 2.4

###### gimp_palette_get_entry_color

Gets the color of an entry in the palette.

since: 2.2

###### gimp_palette_get_entry_name

Gets the name of an entry in the palette.

since: 2.2

###### gimp_palette_set_colormap

This procedure sets the entries in the specified palette in one go, though they must all be in the same `format`.

since: 3.0

###### gimp_palette_set_columns

Sets the number of columns used to display the palette.

since: 2.4

###### gimp_palette_set_entry_color

Sets the color of an entry in the palette.

since: 2.2

###### gimp_palette_set_entry_name

Sets the name of an entry in the palette.

since: 2.2

##### Methods inherited from GimpResource (12)

###### gimp_resource_delete

Deletes a resource.

since: 3.0

###### gimp_resource_duplicate

Duplicates a resource.

since: 3.0

###### gimp_resource_get_id

mostly internal data and not reusable across sessions.

since: 3.0

###### gimp_resource_get_name

Returns the resource’s name.

since: 3.0

###### gimp_resource_is_brush

Returns whether the resource is a brush.

since: 3.0

###### gimp_resource_is_editable

Whether the resource can be edited.

since: 3.0

###### gimp_resource_is_font

Returns whether the resource is a font.

since: 3.0

###### gimp_resource_is_gradient

Returns whether the resource is a gradient.

since: 3.0

###### gimp_resource_is_palette

Returns whether the resource is a palette.

since: 3.0

###### gimp_resource_is_pattern

Returns whether the resource is a pattern.

since: 3.0

###### gimp_resource_is_valid

Returns TRUE if the resource is valid.

since: 3.0

###### gimp_resource_rename

Renames a resource. When the name is in use, renames to a unique name.

since: 3.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

##### Properties inherited from GimpResource (1)

###### Gimp.Resource:id

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GimpPaletteClass {
      GimpResourceClass parent_class;

    }

No description available.

###### Class members

`parent_class: GimpResourceClass`

  No description available.