Gimp.Palette.add_entry

### Method

# Gimp Paletteadd_entry

since: 2.2

#### Declaration [src]

    gboolean
    gimp_palette_add_entry (
      GimpPalette* palette,
      const gchar* entry_name,
      GeglColor* color,
      gint* entry_num
    )

#### Description [src]

Appends an entry to the palette.

Appends an entry to the palette. Neither color nor name must be unique within the palette. When name is the empty string, this sets the entry name to "Untitled". Returns the index of the entry. Returns an error when palette is not editable.

Available since: 2.2

#### Parameters

`entry_name`

  Type: `const gchar*`

  A name for the entry.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`color`

  Type: `GeglColor`

  The color for the added entry.

  The data is owned by the caller of the method.

`entry_num`

  Type: `gint*`

  The index of the added entry.

  The argument will be set by the function.

#### Return value

Type: `gboolean`

TRUE on success.