10. Gradienter

Figur 7.23. Några exempel på GIMP-gradienter.

Några exempel på GIMP-gradienter.

Gradients from top to bottom: FG to BG (RGB); Full saturation spectrum; Nauseating headache; Browns; Four bars


A gradient is a set of colors arranged in a linear order. The most basic use of gradients is by the Gradient tool, sometimes known as gradient fill tool: it works by filling the selection with colors from a gradient. You have many options to choose from for controlling the way the gradient colors are arranged within the selection. There are also other important ways to use gradients, including:

Måla med en gradient

Each of GIMP's basic painting tools allows you the option of using colors from a gradient. This enables you to create brushstrokes that change color from one end to the other.

The Gradient Map filter

This filter is now in the Colors menu, and allows you to colorize an image, using the color intensity of each point with the corresponding color from the active gradient (the intensity 0, very dark, is replaced by the color at most left end of the gradient, progressively until the intensity is 255, very light, replaced by the most right color of the gradient. See Avsnitt 8.38, ”Gradient Map” for more information.

When you install GIMP, it comes presupplied with a large number of interesting gradients, and you can add new ones that you create or download from other sources. You can access the full set of available gradients using the Gradients dialog, a dockable dialog that you can either activate when you need it, or keep around as a tab in a dock. The current gradient, used in most gradient-related operations, is shown in the Brush/Pattern/Gradient area of the Toolbox. Clicking on the gradient symbol in the Toolbox is an alternative way of bringing up the Gradients dialog.

Many quickly examples of working with gradient (for more information see Gradient Tool):

Några användbara saker att känna till om GIMPs gradienter:

The gradients that are supplied with GIMP are stored in a system gradients folder. By default, gradients that you create are stored in a folder called gradients in your personal GIMP directory. Any gradient files (ending with the extension .ggr) found in one of these folders, will automatically be loaded when you start GIMP. You can add more directories to the gradient search path, if you want to, in the Gradients tab of the Data Folders pages of the Preferences dialog.

Nytt i GIMP 2.2 är möjligheten att läsa in gradientfiler i SVG-format, vilket används av många vektorgrafikprogram. Allt som behövs för att få GIMP att läsa in en SVG-gradientfil är att lägga den i mappen gradients i din personliga GIMP-mapp, eller i en annan mapp som finns i din gradient-sökväg.

[Tips] Tips

Du kan hitta ett stort antal intressanta SVG-gradienter på nätet, speciellt hos OpenClipArt Gradients [OPENCLIPART-GRADIENT]. Du kommer inte kunna se hur dessa gradienter ser ut om inte din webbläsare stöder SVG, men det hindrar inte dig att hämta hem dem.