12.3. Gradient Editor

The gradient editor

The Gradient Editor allows you to edit the colors in a gradient. It can only be used on gradients you have created yourself, not on the gradients that come pre-installed with GIMP. This is a sophisticated tool that may take a bit of effort to understand. The concept behind it is that a gradient can be decomposed into a series of adjoining segments, with each segment consisting of a smooth transition from the color on the left edge to the color on the right edge. The Gradient Editor allows you to pack together any number of segments, with any colors you want for the left and right edges of each segment, and with several options for the shape of the transition from left to right.

Layout

Name

At the top of the dialog you see the name of the gradient. You can edit this if you want to.

Gradient Display

Below the name, you see the current result of your work.

Range Selection/Control Sliders

Below the gradient display, you see a set of black and white triangles lined up in row. A segment is the space between two consecutive black triangles. Inside each segment is a white triangle, which is used to "warp" the colors in the segment, in the same way that the middle slider in the Levels tool warps the colors there. You can select a segment by clicking between the two black triangles that define it. You can select a range of segments by shift-clicking on them. The selected range always consists of a set of consecutive segments, so if you skip over any when shift-clicking, they will be included automatically. If "Instant update" is checked, the display is updated immediately after any slider movement; if it is unchecked, updates only occur when you release the mouse button.

Scrollbar

Below the sliders is a scrollbar. This only comes into play if you zoom in using the buttons at the bottom.

Feedback Area

Below the sliders is an area that initially is blank, but depending on your actions, helpful hints or feedback messages may appear here.

Buttons

At the bottom of the dialog appear five buttons:

Save.  Clicking this button causes the gradient, in its current state, to be saved in your personal gradients folder, so that it will automatically be loaded the next time you start GIMP.

Revert.  Clicking this button undoes all of your editing. (However, at the time this is being written, this function is not yet implemented.)

Zoom Out.  Clicking this button shrinks the gradient display horizontally.

Zoom In.  Clicking this button expands the gradient display horizontally. You can then use the scrollbar to pan the display left or right.

Zoom All.  Clicking this button resizes the display horizontally so that it fits precisely into the window.

Gradient Editor Menu

The Gradient Editor menu

You can access the Gradient Editor menu either by right-clicking on the gradient display, or by choosing the top item in the dialog's tab menu. The menu allows you to set the left and right edge colors for each segment, and control the transition from one color to the other.

Options

Left [Right] Endpoint's Color

These options allow you to choose a color for the respective endpoint using a Color Editor.

Load Left [Right] Color From

The "Load Color From" submenu

These options give you a number of alternative ways of assigning colors to the endpoints. From the submenu you can choose (assuming we're dealing with the left endpoint):

  • Left Neighbor's Right Endpoint.  This choice will cause the color of the right endpoint of the segment neighboring on the left to be assigned to the left endpoint of the selected range.

  • Right Endpoint.  This choice will cause the color of the right endpoint of the selected range to be assigned to the left endpoint.

  • FG/BG color.  These choice cause GIMP's current foreground or background color, as shown in the Toolbox, to be assigned to the endpoint.

  • RGBA slots.  At the bottom of the menu are 10 "memory slots". You can assign colors to them using the "Save" menu option described below. If you choose one of the slots, the color in it will be assigned to the endpoint.

Save Left [Right] Color To

These options cause the color of the endpoint in question to be assigned to the "memory slot" selected from the submenu.

Blending Function for Selection

The Blending Function submenu

This option determines the course of the transition from one endpoint of the range to the other, by fitting the specified type of function to the endpoints and midpoint of the range.

Coloring Type for Selection

The Coloring Type submenu

This option gives you additional control of the type of transition from one endpoint to the other: as a line either in RGB space or in HSV space.

Flip Selection

This option does a right-to-left flip of the selected range, flipping all colors and endpoint locations.

Replicate Selection

This option splits the selected range into two parts, each of which is a perfect compressed copy of the original range.

Split Segments at Midpoints

This option splits each segment in the selected range in into two segments, splitting at the location of the white triangle.

Split Segments Uniformly

This option is similar to the previous one, but it splits each segment halfway between the endpoints, instead of at the white triangle.

Delete Selection

This option deletes all segments in the selected range, replacing them with a single black triangle at the center, and enlarging the segments on both sides to fill the void.

Re-center Midpoints in Selection

This option moves the white triangle for each segment in the selected range to a point halfway between the neighboring black triangles.

Re-distribute Handles in Selection

This option causes the black and white triangles in the selected range to be shifted so that the distances from one to the next are all equal.

Blend Endpoints' Colors

This option is only available if more than one segment is selected. It causes the colors at interior endpoints in the range to be averaged, so that the transition from each segment to the next is smooth.

Blend Endpoints' Opacity

This option does the same thing as the previous option, but with opacity instead of color.

[Caution] Caution

There is no "undo" available within the Gradient Editor, so be careful!

The first four gradients in the list

The first four gradients in the list are special: they use the Foreground and Background colors from the Toolbox Color Area, instead of being fixed. See the Gradients section for more information.