3.4.  Gradients Dialog

Revision History
Revision $Revision: 2409 $ 2008-02-22 j.h

The Gradients dialog offers a gradient palette which is used to select a gradient -- a set of colors arranged in a linear scale -- for use with the Blend tool and numerous other operations. It also gives you access to several functions for manipulating gradients. You can select a gradient by clicking on it in the list: it will then be shown in the Brush/Pattern/Gradient area of the Toolbox. A few dozen nice gradients come pre-installed with GIMP. You can create more using the Gradient Editor. General information about gradients and how they are used in GIMP can be found in the Gradients section.

The first four gradients are particular: they reproduce the gradient between Foreground and background colors of toolbox in different ways.

  • FG to BG (RGB): default gradient, between the Foreground and the background colors of the Toolbox, in the RGB mode.

  • FG to BG (HSV clock-wise/counter-clockwise Hue): all hues in the color circle between the Foreground and the background color, clockwise or counter-clockwise.

  • FG to Transparent: only uses one color (the Foreground color) from complete opacity to complete transparency. This gradient is very useful when you work with softly blended collages or fog effects.

The Gradients dialog is a dockable dialog; see the section on Dialogs and Docking for help on manipulating it. It can be activated in several ways:

  • From the Toolbox menu: File->Dialogs->Gradients.

  • From the Toolbox menu: File->Dialogs->Create New Dock->Brushes, Patterns, and Gradients. This gives you a new window with several dialog docks, one of them opens the Gradients dialog.

  • From the Toolbox, by clicking on the current gradient in the Brush/Pattern/Gradient area.

  • From an image menu: Dialogs->Gradients.

  • From the Tab menu in any dockable dialog: Add Tab->Gradients.

  • From the image by using the Ctrl+G shortcut.

The most basic, and most commonly used, operation with the dialog is simply to click on one of the gradients in the scrollable list, in order to make it GIMP's current gradient, which will then be used by any operation that involves a gradient.

If you double-click on a gradient, you open the Gradient Editor where you will be able to edit its name. Note, however, that you are only allowed to change the names of gradients that you have created yourself, not the ones that come pre-installed with GIMP. If you try to rename a pre-installed gradient, you will be able to edit the name, but as soon as you hit return or click somewhere else, the name will revert to its original value. It is a general rule that you cannot alter the resources that GIMP pre-installs for you: brushes, patterns, gradients, etc; only ones that you create yourself.

Grid/List modes

In the Tab menu, you can choose between View as Grid and View as List. In Grid mode, the gradients are laid out in a rectangular array. They look quite dazzling when viewed this way, but it is not very easy to pick the one you want, because of visual interference from the neighboring ones. In List mode, the more usable default, the gradients are lined up vertically, with each row showing its name.

In the Tab menu, the option Preview Size allows you to adapt the size of gradient previews to your liking.

The buttons at the bottom of the dialog allow you to operate on gradients in several ways:

The functions performed by these buttons can also be accessed from the dialog pop-up menu, activated by right-clicking anywhere in the gradient list, or via Gradient Menu in the Tab menu:

The gradient menu also gives you some additional functions:

The Gradient Editor allows you to edit the colors in a gradient. It can only be used on gradients you have created yourself (or on a copy of a system gradient), not on system 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.

Name

In the name area, you have the tab menu button (the small triangle).

The Gradient Preview Window

Below the name, you see the current result of your work if the Instant update option is checked; else, changes will appear only when you release the mouse button.

If you simply move the mouse pointer on this display, it works somewhat as a color-picker. Values of the pointed pixel are displayed in a rather odd way. Position is a number given to 3 decimal places, from 0.000 on the left to 1.000 on the right of the whole gradient. RGB, HSV, Intensity and Opacity are also a ratio...

If you click-n-drag on display, then only position and RGB data are displayed. But they are passed on to the Foreground color in the Toolbox and to the four first gradients of the list (by pressing the Ctrl key, the Color is sent to the Background color of the Toolbox).

Range Selection/Control Sliders

Below the gradient display, you see a set of black and white triangles lined up in row which allow you to adjust endpoints and midpoints in the gradient preview. 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. It turns from white to blue. 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.

You can move sliders, segments and selections. If you simply click-n-drag a slider, you only move the corresponding transition. By click-n-drag on a segment you can move this segment up to the next triangle. By Shift+click-n-drag on a segment/selection, you can move this segment/selection and compress/ dilate next segments.

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, a color swatch shows the color pointed by the mouse cursor. Informations about this color and helpful hints or feedback messages may appear here.

Buttons

At the bottom of the dialog appear five buttons:

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 edit endpoint's color (set the left and right edge colors for each segment), blend colors, select a color model and edit segments. This editor works only with custom gradients or a copy of a system gradient.

The following commands can be found in the menu:

Editing endpoint's color

Left/Right color type

This command opens a submenu:

This submenu allows you to select the endpoint color from the toolbox foreground and background colors. Whenever you change the foreground or background color, this endpoint color may be changed as well. The alternative is to select a Fixed endpoint color.

Left [Right] Endpoint's Color

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

[Note] Note

This command is related to the previous one and becomes inactive if you have selected a color yet.

Load Left [Right] Color From

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

This choice causes GIMP's current foreground or background color, as shown in the Toolbox, to be assigned to the endpoint. Note that changing foreground or background color later will not change the endpoint's color.

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.

[Caution] Caution

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