### Function

# Gimp context_set_gradient

#### Declaration [src]

    gboolean
    gimp_context_set_gradient (
      const gchar* name
    )

#### Description [src]

Sets the specified gradient as the active gradient.

This procedure lets you set the specified gradient as the active or "current" one. The name is simply a string which corresponds to one of the loaded gradients. If no matching gradient is found, this procedure will return an error. Otherwise, the specified gradient will become active and will be used for subsequent custom gradient operations.

Available since: | 2.2

#### Parameters

`name` | `const gchar*`
| The name of the gradient.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `gboolean`
| TRUE on success.