Fill and Stroke Paint

There are a number of different options for the Riempimento and Colore contorno of an object. Examples of the different options are shown below. The use of these options for the Riempimento and the Colore contorno is basically the same, so we'll use the word fill to talk about both at the same time.

Fill.
Choices for the Riempimento of an object, from left to right: No fill, Flat color, Linear gradient, Radial gradient, Pattern, Unset.
Stroke paint.
Choices for the Colore contorno of an object, from left to right: No fill, Flat color, Linear gradient, Radial gradient, Pattern, Unset. The stroke has been widened to make it easier to see the effect of the different options.

The fill type can be set using the Riempimento e Contorni dialog under the Riempimento and Colore contorno tabs. The fill type can be one of the following choices (set by clicking an icon):

A Gradiente fill type can also be selected by using the Strumento Gradiente.

Each of the options (except the No paint and Unset options) is discussed below.

Flat (Solid) Colors

Color can be the simplest or the most complicated aspect of a drawing depending on your needs. Color is stored internally in Inkscape as a six-digit esadecimale number consisting of three pairs of digits. Each pair of digits corresponds to the amount of Red, Green, Blue (RGB). This matches the SVG specification for describing color. For example, a color defined as #FF7F00 has red, blue, and green components of 100%, 50%, and 0%, respectively, of the maximum values.

In some cases, a fourth pair of digits is added to describe Alpha (RGBA). The A or Alpha attribute may not be familiar to many people. This attribute specifies how transparent the fill should be. It can range from 0 for complete trasparenza to 255 (esadecimale FF) for complete opacitą. The term opacitą is often used in place of Alpha. Its value ranges from 0% (0.0) for a transparent object to 100% (1.0) for an opaque object.

Modified in v0.46 (CMS interface):

In principle, this is a simple description for specifying any color. The complexity comes from assuring that the color reproduced on a display or in printing matches the color the artist envisioned. Various color «systems» have been developed to facilitate this. Inkscape supports base ICC profile functionality through the use of LittleCMS. Setting up color management can be done under the Color management section in the Preferenze di Inkscape dialog. Color managements support is only available under Linux and Macintosh OS X. Profiles internal to a bitmap are also not handled. A complete discussion of this topic is beyond the scope of this book.

The fill color of an object can be modified a variety of ways including using the Riempimento e Contorni dialog, the Palette, the Campioni dialog, and the Strumento Contagocce. Some of these methods can also be used to change the color of a Gradiente stop when a Gradiente handle is selected.

Fill and Stroke Dialog - Color

When the use of a flat (or solid) color is specified for the Riempimento and Colore contorno of an object, the corresponding tab of the Riempimento e Contorni dialog will show five sub-tabs, each one corresponding to a different method of specifying the color plus one for color management. Each method is described next in its own section.

Except for the Wheel tab, each color parameter can be set by either dragging a slider (small triangles), typing the desired value into the entry box, using the up/down arrows in the widget (Right Mouse+Click on an arrow causes the value to change to the minimum or maximum, Middle Mouse+Click cause the value to increment or decrement by 10), or the Up/Down Arrow keys after the entry box is selected. The slider bar shows the current value (triangles) and what the color will look like as that slider is dragged.

Parameter entry widget.
Methods for setting a color parameter.

The A or Alpha attribute specifies how transparent the fill should be, 0 for completely transparent and 255 (100) for completely opaque in the case of the RGB, HSL, and Wheel (CMYK) methods.

RGB

RGB (Red, Green, Blue) is a method for specifying a color in terms of the three additive primary colors. This is the native method for computer screens. Range of allowed values is from 0 to 255 (0 to FF in esadecimale).

RGB tab.
RGB tab for setting Riempimento color.
HSL

HSL (Hue, Saturation, Lightness) is a method for specifying color in terms of hue (color in optical spectrum), saturation (intensity-purity), and lightness. The range for saturation is from a pure color to gray. The range for lightness is from black to pure color to white. Range of allowed values is from 0 to 255 (0 to FF in esadecimale).

HSL tab.
HSL tab for setting Riempimento color.
CMYK

CMYK (Cyan, Magenta, Yellow, Key [Black]), is a method for specifying color in terms of subtractive primary colors and is commonly used in printing. Range of allowed values is from 0 to 100.

[Avvertimento]Avvertimento

Inkscape stores color internally in the RGB format. This is the only color specification supported by SVG. Furthermore, the entry boxes are set up so that the value in one is always zero. (Any color in RGB color space can be defined using only three of the CMYK terms. The definition is not unique.) Better support for CMYK is planned.

CMYK tab.
CMYK tab for setting Riempimento color.
Wheel

The Wheel is an alternative way of changing color in the HSL paradigm. Dragging the line around the circle changes the Hue. Dragging the small circle within the triangle parallel to the edge that varies from white to black changes the Lightness and dragging perpendicular to that edge changes the Saturation.

Wheel tab.
Wheel tab for setting Riempimento color.
CMS

New in v0.46.

This tab allows editing of colors managed by an icc profile if enabled.

Palette and Swatches Dialog

The color Palette, located near the bottom of the main Inkscape window, and the Campioni dialog (Visualizza Campioni... (Shift+Ctrl+W)) allows one to quickly set the color of an object's Riempimento or Contorno or to set the color of a Gradiente Passaggio. They can also be used to set the Stile corrente. There use is essentially identical so they will be treated together. The visibility of the Palette can be toggled via a check box in the Visualizza Mostra/Nascondi submenu.

Swatches dialog.
Swatches dialog.

The following methods are available for both the Palette and the Campioni dialog:

  • Left Mouse Click on a swatch to change the Riempimento of selected objects or the color of selected GradientePassaggi to the color of the swatch. Shift+Left Mouse Click on a swatch to change the Contorno of selected objects. The Stile corrente will also change (no object need be selected).
  • Left Mouse Drag from a swatch to an object's Riempimento or Contorno or to a GradientePassaggio to change the corresponding attribute to the swatch's color. Shift+Left Mouse Drag to anywhere on an object to set the Contorno color (except to a GradientePassaggio). The target object need not be selected. The Stile corrente will not change.
  • Left Mouse Drag from a swatch to the Riempimento or Contorno part of the Indicatore di Stile to change the Riempimento or Contorno of selected objects. The Stile corrente will also change.
  • Right Mouse Click on a swatch to open a small dialog which allows you to assign the color to the Riempimento or Contorno of selected objects. The Stile corrente will also change.

You can also drag colors to or from other applications that support Drag and Drop.

Inkscape has a variety of built-in palettes (some copied from Gimp). More palettes can be added by installing palette files in the directory share/palettes. The files use the Gimp palette file structure where colors are defined in terms of a triplet of numbers in a "RGB" format. See la sezione chiamata «Custom Swatches or Palettes» in Capitolo 21, Customization, for details.

Both the Palette and the Campioni dialog have a pull-down menu (far right) where you can set the size and shape of the swatches, if the colors should be displayed in one row or in multiple rows, and which palette should be used. Hovering the pointer over a swatch will display a color's name in a descrizione. A scroll bar gives access to colors in a palette that are not displayed when there are too many colors to fit.

Style Indicator

The Indicatore di Stile located on the left side of the Barra di Stato displays information on selected objects, text fragments, or Gradiente stops. The indicator includes a number of methods to alter style including: pop-up menus, targets for Drag and Drop colors, and Color Gestures.

Display

The Indicatore di Stile has three parts showing Riempimento, Colore contorno, and opacitą (O), which show attributes for selected objects or text fragments. The Riempimento and Colore contorno parts are referred to as the fill indicators.

Style Indicator.
The Indicatore di Stile showing the attributes of an object with a red Riempimento, a blue Colore contorno, a Contorno width of ten pixels, and a Master opacitą of 100%.

A displayed fill attribute can be one of:

  • Color swatch: Shows color with (left) and without (right) Alpha (Alpha refers to the Riempimento and Colore contorno attributes and not the object's Master opacitą).

  • N/A: Not Applicable (i.e., no object selected).

  • None: No fill defined.

  • Unset: fill is unset.

  • L Gradient: fill is a linear Gradiente.

  • R Gradient: fill is a radial Gradiente.

  • Pattern: fill is a pattern.

  • Different: More than one object selected with different fill.

When multiple objects are selected and all of the selected objects have a color fill, then one of the following letters will be shown:

  • m: Selected objects have same fill color.

  • a: Selected objects have different fill colors. The color displayed is an average of the colors in the selected objects.

For Gradiente handles, both parts (Riempimento and Colore contorno) show the handle color.

The Indicatore di Stile has a number of features that depend on the part.

  • Fill/Stroke Paint indicators:

    • A Left Mouse Click opens the Riempimento e Contorni dialog with the corresponding tab selected.

    • A Middle Mouse Click on a bar removes the fill from the selected objects if a fill is defined. If no fill is defined, it sets the fill to black.

    • A Right Mouse Click on a bar opens a pop-up menu as discussed below.

    • A color from the Palette or Campioni dialog can be dragged and dropped onto one of the fill indicators to change the fill of all selected objects.

  • Stroke indicator:

    • A Left Mouse Click opens the Riempimento e Contorni dialog to the Stile contorno tab.

    • A Right Mouse Click opens the a pop-up menu that allows the stroke width unit to be changed as well as a preset width to be selected. The stroke can also be removed with this menu.

  • Opacity indicator:

    • A Right Mouse Click on the numeric field opens up a pop-up menu with preset opacity values.

    • A Middle Mouse Click on the "O:" label cycles through the opacity values 0%, 50%, and 100% (0.0, 0.5, and 1.0).

Fill Indicator Pop-up Menu

A Right Mouse Click on either the Riempimento or Colore contorno bar opens a pop-up menu with entries that act on the Riempimento or Colore contorno of the selected objects or text fragments, depending on which bar was clicked. If a Gradiente handle is selected, the menu entries apply to that handle.

Style Indicator Menu.
The Indicatore di Stile pop-up menu.
  • Edit fill... (Edit stroke...): Opens Riempimento e Contorni dialog. (The dialog can also be opened directly by a Left Mouse Click on the Riempimento or Colore contorno part of the Indicatore di Stile.)

  • Last set color: Applies the last set color to the Riempimento or Colore contorno of selected objects. A color is set when a color is applied to any object or when a color is selected from the Palette.

  • Last selected color: Applies the last selected color to selected objects. The last selected color is the color of the previously selected object(s) prior to selecting the object(s) whose color is to be changed. If the color is to be applied to multiple objects, they must be selected together using a elastico selection.

  • Invert: Inverts the color of the Riempimento or Colore contorno of selected objects. If more than one object is selected, the colors of those objects are averaged before the color is inverted. The opacitą is not changed.

  • White: Set Riempimento or Colore contorno to white.

  • Black: Set Riempimento or Colore contorno to black.

  • Copy color: Copies color of selected objects to the clipboard in esadecimale format. If more than one object is selected, the colors of those objects are averaged.

  • Paste color: Pastes color to selected objects from the clipboard.

  • Swap fill and stroke: Exchanges Riempimento and Colore contorno colors.

  • Make fill (stroke) opaque: Sets Riempimento or Colore contorno to full opacitą. (Does not affect Master opacity.)

  • Unset fill (stroke): Unsets the Riempimento or Colore contorno of selected objects.

  • Remove fill (stroke): Removes the Riempimento or Colore contorno of selected objects.

Color Gestures

New in v0.46.

Color Gestures is the name give to changing the color of a Riempimento, Contorno, or Gradiente Passaggio by dragging the mouse from a fill indicator into the Inkscape window. The principle is that as you drag the mouse, the color will change proportionally to the distance from a 45° line from the indicator. The farther away you are, the more subtle the changes can be. Changes are made in the HSL color space.

Gestures diagram.
Diagram for Color Gestures. Dragging the mouse away from the Riempimento indicator to the left or up from the dash line increases hue (blue to red) while dragging to the right or down decreases hue (blue to green). Dragging straight up or straight across results in the maximal change possible (blue to yellow). Note the small H on the cursor. This indicates that hue is being altered.

With out any modifier key, changes are made to hue. With the Shift changes are made to saturation while with the Ctrl changes are made to lightness. Note that the letter next to the cursor will change to indicate the mode. Key modifiers can be changed while dragging. When a key modifier is changed, the «zero» line (normally at 45°) changes to pass through the current cursor position. This is to avoid abrupt changes in color when changing modifiers. The Alt modifier disables changes to the color so that the cursor can be repositioned.

If more than one object or Gradiente Passaggio is selected, the starting color will be the average color of the selected items and the final color will be the same. If you wish to shift the color in the same way for a number of objects but preserve the relative differences use the Strumento Ritocco.

Color gestures are very useful once you get the hang of them. It is well worth spending a little time to play with them!

Dropper Tool

The Riempimento and Colore contorno color of an object can be changed by using the Strumento Contagocce to grab an existing color in the drawing. Options allow for grabbing the average color over a circular region, inverting the grabbed color, and saving the grabbed color to the system appunti (as a RGBA hexadecimal number).

To use the Strumento Contagocce, first select the object that you want to modify with a tool other than the Strumento Contagocce. Recall that you can switch temporarily to the Strumento Selettore by using the Space Bar.

Then select the Strumento Contagocce by clicking on the icon (F7 or D) in the Controlli Strumento. Finally click with the Strumento Contagocce on the desired color. The shortcut D will toggle between the Strumento Contagocce and any other tool (as of v0.46).

The Shift causes the chosen color to be applied to the object's Colore contorno rather than the Riempimento. The Alt causes the inverse color to be applied. The Shift and Alt keys can be used in combination. However, neither of the modifier keys are useful when copying a color to the appunti.

  • Left Mouse Click: Pick Riempimento color.

  • Left Mouse Drag: Pick average Riempimento color (color is averaged over circle created during drag).

  • Ctrl+C: Copy color under cursor to system appunti in the form of an 8-digit hexadecimal number (two digits for each of RGBA).

Changed in v0.45 and again in v0.46:

The Strumento Contagocce Controlli Strumento has two buttons (check boxes in v0.45) that determine if the Alpha of a color should be picked and/or set. These settings affect the way a color is picked if the «picked» object has an opacitą different from 1.0 (or 100%).

Dropper Tool Controls.
The Strumento Contagocce-Controlli Strumento: Dropper Tool Controls. : Pick alpha. Dropper Tool Controls. : Set alpha.
  • Pick alpha disabled:  The color picked is as shown on the screen. For example, picking the color from an object with a dark blue fill but an opacity of 0.5 would result in a light blue color with an opacity of 1.0. Opacity of set object not changed.

  • Pick alpha enabled, Set alpha disabled:  The color picked is the color that the object would have if its opacity was 1.0. A dark blue object with an opacity of 0.5 would result in a dark blue color (an opacity of 1.0). Opacity of set object not changed.

  • Pick alpha enabled, Set alpha enabled:  The color and opacity are both copied from the picked object. A dark blue object with an opacity of 0.5 would result in a light blue color composed of a dark blue fill with an opacity of 0.5. Opacity of set object changed. Note: This is only applicable if the color is picked from an object with trasparenza that is not over another object.

Dropper tool and alpha.
Color squares shown with the numerical values of their color (hexadecimal) and opacity. From left to right: Picked color, set color with Pick alpha box not checked, set color with Pick alpha box checked but Set alpha box not set, set color with both Pick alpha and Set alpha boxes checked. In all cases, the original opacity of the «Set» squares was 1.0.

Note: v0.45 has a bug. If the color is not picked correctly with a Left Mouse Click, use a small Left Mouse Drag.

Gradients

Onscreen creation and editing of intermediate Passaggi added in v0.46.

Gradienti are a smooth blending from one color to another. Gradienti can be used to build up complex shading of an object as shown in the flower petal below. Note: As of v0.45, Inkscape supports the Sfocatura Gaussiana filter, which may be an easier way to produce complex shadings.

Flower Petal.
A flower petal consisting of four layers. From left to right: The finished petal. The base layer. A highlight. A duplicate of the base layer with partial transparency to mask part of the highlight layer. Top shadow layer. The background is gray to show the transparency in some layers.

In Inkscape, Gradienti can be linear or radial and can consist of transitions between two or more well-defined colors referred to as Passaggi.

Examples of gradients.
An example of a linear (left) and a radial Gradiente (right), both with three defined colors or Passaggi.

Inkscape does not support non-linear Gradienti. Non-linear Gradienti can be simulated by adding extra Passaggi.

There are three parts to using a Gradiente; each treated in the next three sections:

  1. Attach a Gradiente to an object.
  2. Edit the Passaggi.
  3. Adjust the orientation and extent of the Gradiente.

The use of linear and radial Gradienti is essentially the same and both will be treated together.

[Nota]Nota

If you want a Gradiente to transform with an object, you must toggle on this option using the icon that is in the Controlli Strumento when the Strumento Selettore is in use.

Attaching Gradients to Objects

Gradienti can be attached to an object either with the Riempimento e Contorni dialog or through the use of the Strumento Gradiente.

To attach a Gradiente with the Riempimento e Contorni dialog, simply select an object and click on either the linear or radial Gradiente icons in the dialog. A Gradiente with two Passaggi will automatically by created and applied to the object. The Passaggi will have the color of the previous Riempimento with one Passaggio having full opacitą and the other full trasparenza. The following figure shows the dialog after attaching a Gradiente this way.

Gradient dialog.
Gradient selected in Riempimento e Contorni dialog.

An already defined Gradiente can be assigned to the object by selecting the Gradiente from the drop-down menu under the Fill tab of the Riempimento e Contorni dialog. A Gradiente can also be assigned to the Contorno of an object under the Stroke paint tab.

To attach a Gradiente with the Strumento Gradiente, select the tool by clicking on the icon (Ctrl+F1 or g) in the Casella degli Strumenti.

The Strumento Gradiente Controlli Strumento has options to choose a linear or a radial Gradiente and the application of the Gradiente to the Fill or Stroke of an object. Once the options are selected, Left Mouse Drag across an object to attach a Gradiente. The start and stop point of the drag will define the range of the Gradiente (where the start and end Passaggi are placed, see below). If an already defined Gradiente has been chosen from the drop-down menu in the Controlli Strumento it will be applied to the object. Otherwise a two Passaggio Gradiente will automatically be created with both Passaggi the color of the objects existing Riempimento and with one Passaggio full opacitą and the other with full trasparenza.

Editing Stops

Gradienti can be modified by adding, deleting, moving, or changing the color and opacitą of Passaggi.

As of Inkscape v0.46, Gradienti can be edited onscreen. This is much more convenient than using the Editor Gradiente dialog.

Onscreen Editing

An object with a Gradiente displays Gradiente handles when the Strumento Gradiente, Strumento Nodo, or one of the strumenti forma is active (the latter two if enabled in the Preferenze di Inkscape dialog). Some editing actions work when any of these tools is active, others work only with the Strumento Gradiente.

Circle, diamond, and square handles represent start, intermediate, and end Passaggi respectively. Editing Passaggi has many parallels to editing nodes.

Examples of Gradients;.
Linear and radial Gradienti showing the Gradiente handles.

Passaggi can be selected by clicking on them with the Strumento Gradiente, the Strumento Nodo, or one of the strumenti forma. To select more than one use Shift+Left Mouse Click. With the Strumento Gradiente you can use a elastico selection by using Shift+Left Mouse Drag or you can select all the Passaggi by using Ctrl+A.

To add a new intermediate Passaggio, with the object selected and the Strumento Gradiente active:

  • Double click on the Gradiente path. A new Passaggio will be added where you clicked. The Passaggio will take the existing color under the path. Note that at least one Passaggio must already be selected.
  • Ctrl+Alt+Left Mouse Click on the Gradiente. A new Passaggio will be added where you clicked. The Passaggio will take the existing color under the cursor.
  • Select two adjacent Passaggi and press Insert. A new Passaggio will be added halfway between the selected Passaggi and with a color halfway in-between.
  • Drag a color from the Palette or the Campioni dialog unto the Gradiente path. A new Passaggio will be created with the dragged color at the point of the drop (drop too far from the path and the Riempimento will be changed to solid with the dragged color). This also works if the Strumento Nodo or one of the strumenti forma is active.

To remove an intermediate Passaggio, with the Strumento Gradiente active:

  • Click on it using Ctrl+Alt+Left Mouse Click. This also works if the Strumento Nodo or any of the strumenti forma are active.
  • Use the Del to remove selected Passaggi. If there is at least one intermediate Passaggio then deleting the start or end Passaggi will shorten the Gradiente with the nearest intermediate Passaggio becoming a start or end Passaggio. If there is no intermediate Passaggio then deleting a start or end Passaggio will replace the Gradiente with a solid Riempimento of the color of the remaining Passaggio.
  • Using Ctrl+L will attempt to simplify the Gradiente over the a region defined by selected Passaggi by adjusting and removing some Passaggi. This is particularly useful for removing redundant Passaggi.

To move an intermediate Passaggio:

  • Drag it with the Strumento Gradiente, Strumento Nodo, or one of the strumenti forma. If more than one Passaggio is selected they will all move together. Dragging with the Ctrl snaps the Passaggi at points that are multiples of 1/10th of the distance between the nearest neighboring unselected Passaggi. Dragging with the Alt moves selected Passaggi according to how far away they are from the dragged Passaggio.
  • With one or more Passaggi selected and the Strumento Gradiente active, use the Arrow keys. If multiple intermediate Passaggi are selected, they will move together. Using the Shift with the Arrow keys accelerates the shift by a factor of 10. Using the Alt moves the selected Passaggi one screen pixel at a time. Using Shift+Alt moves the Passaggi ten screen pixels at a time.

Note: You cannot move a Passaggio past an adjacent Passaggio.

There are several ways to see and change the style (color and/or trasparenza) of one or more Passaggi. In general, if no Passaggio is selected, indicators and changes apply to the whole object; if one Passaggio is selected, indicators and changes apply to that Passaggio; and if multiple Passaggi are selected, indicators show an average value for the selected Passaggi and changes apply to all selected Passaggi.

  • The Riempimento e Contorni dialog: If no Passaggio is selected the Gradiente is previewed at the top under the Riempimento or Contorno tab. Otherwise the current color and opacitą values for selected Passaggi are shown. Changes apply to all selected Passaggi.
  • The Indicatore di Stile: If no Passaggio is selected the indicators show previews of the Gradienti (Riempimento and Contorno). Otherwise the current values for selected Passaggi are shown. Changes apply to all selected Passaggi. See la sezione chiamata «Style Indicator», earlier in this chapter for more details.
  • Drag-and-Drop: Colors can be dragged from either the Palette or from the Campioni dialog onto Passaggi (or onto the Gradiente path to add a new Passaggio).
  • Copy-and-Paste: Colors can be copied to and from the appunti. Copying to the appunti (Modifica Copia (Ctrl+C)) will copy a Passaggio color and opacitą if one Passaggio is selected or the average color if more than one is selected. Pasting the style (Modifica Incolla Stile (Shift+Ctrl+V)) copies from the appunti the color and opacitą to all selected Passaggi.
Using the Gradient Editor Dialog

There is a dedicated Editor Gradiente dialog for editing Gradienti. It is envisioned that this dialog be removed as redundant in the future. To call up the dialog, click on the Edit... button, either in the Riempimento e Contorni dialog or the Strumento Gradiente-Controlli Strumento. Note that which Gradiente is being edited does not change automatically when you select an object with a different Gradiente.

Gradient Editor dialog.
Editor Gradiente dialog showing first default Passaggio.

In this dialog, the Gradiente is shown at the very top. Next down is the current Passaggio. You can see that the Passaggio shown above (stop2387) is a solid blue, fully opaque with Alpha = 255. You can also see from the Offset slider that the Passaggio shown is set all the way to the left (and as the Passaggio is at one limit of the Gradiente, its position can't be moved). The color and transparency of this Passaggio can be changed in the Stop Color section. The tabs work the same as those described in the Flat Colors section above. The Strumento Contagocce can also be used to change one of the end Gradiente colors by first selecting the corresponding Gradiente handle. (To modify a non-end Gradiente color, copy the color to the appunti by using Ctrl+C with the desired color selected with the Strumento Contagocce and then paste into the Gradient Editor RGBA entry box.)

To edit another Passaggio, select that Passaggio in the pull-down menu. In the default case described above, the second Passaggio (stop2389) has the same color as the first but is fully transparent (e.g., Alpha = 0). This is shown in the current Passaggio section by the divided box. The left half shows the color with Alpha and the right half without Alpha. Note also that the Offset slider is fully to the right.

Gradient Editor dialog: Second Passaggio.
Editor Gradiente dialog showing second default Passaggio.

To add a Passaggio, click on the Add stop button. The new Passaggio will be added to the right of whichever Passaggio was selected, unless that Passaggio was the farthest to the right, in which case the new Passaggio will be added to the left. The position, color, and transparency for the new Passaggio will be set to halfway between its neighbors.

The following figures show a third Passaggio added to a Gradiente after its color and position have been adjusted.

Gradient Editor dialog: Added stop.
Editor Gradiente dialog showing added third Passaggio. Note that the new Passaggio has an offset of 0.25, that is the center of the Passaggio will be one quarter of the Gradiente width from the left.
Examples of gradients.
An example of a Gradiente, before and after adding a third Passaggio.

To delete a Passaggio, select the Passaggio, then click on the Delete stop button. As at least two Passaggi are required to define a Gradiente, you cannot delete a Passaggio if only two are defined.

Adjusting Gradients

Once a Gradiente has been applied to an object, the orientation and extent of the Gradiente can be changed via dragging the outer two Gradiente Passaggi indicated by the square and circle handles. The handles appear when the Strumento Gradiente is selected. They will also appear by default when many of the other tools are selected (controlled by the Enable Gradiente editing option in the Preferenze di Inkscape dialog under each tool tab). For linear Gradienti, one set of handles define the range of the Gradiente. The Gradiente is parallel to the line connecting the two handles. For radial Gradienti, there are two sets of handles (or Passaggi) at right angles to each other, sharing the square center handle. The center, handle controls the origin of the Gradiente (one «edge»), while the two circular handles control the range of the Gradiente in orthogonal directions. This allows a radial Gradiente to have an elliptical shape.

Examples of Gradients.
Linear and radial Gradienti showing the Gradiente handles after adjusting the orientation and range of the Gradiente.

A radial Gradiente can be made asymmetric by dragging the center handle (diamond) while holding down the Shift key. A cross will appear where the center of the Gradiente is located. The cross can be dragged to make further adjustments.

Examples of Gradients.
A radial Gradiente with a symmetric fill (left) and an asymmetric fill (right).

Gradiente handles from two different objects will snap together if one is placed over the other. This facilitates aligning Gradienti between different objects. The handles will then move together. If multiple objects are selected when a Gradiente is created, all the objects will share a common Gradiente.

Examples of Gradients.
The eight objects share a common Gradiente.

An option only accessible through the Gradiente tabs of the Riempimento e Contorni dialog is defining how the area outside the Gradiente range is filled. The three options are: fill with the solid color of the edge Passaggi (None), fill with a reflection of the same Gradiente (Reflect), and fill with a translation of the same Gradiente (Direct). The effect of these three options is shown next.

Examples of gradients.
An example of a linear Gradienti with different repeat options. From left to right: None, Reflected, and Direct.
Examples of Gradients.
An example of a radial Gradiente with different repeat options. From left to right: None, Reflected, and Direct.

The keyboard shortcut Shift+R reverses the Gradiente direction when the Strumento Gradiente is active. This is especially useful for radial Gradienti where one cannot just drag the Gradiente handles to reverse the Gradiente.

Patterns

Updated for v0.46.

Any object or set of objects can be turned into a Motivo and used in the fill of an object. The Motivo can be shifted, rotated, and stretched as necessary. Inkscape, as of v04.6, includes a set of Motivi accessible through the Riempimento e Contorni dialog. The Vine Design tutorial covers creating and using Motivi.

Pattern examples.
A few of the Motivi included in Inkscape.
[Avvertimento]Avvertimento

Check the licenses of the bitmap patterns included with Inkscape to see if they are compatible with your artwork. They are not public domain! (Look inside the SVG file or use the Editor XML to look in the «defs» section.)

The Motivi included with Inkscape are defined in the file patterns/patterns.svg located in the Inkscape «share» directory. Edit or replace this file to include your own stock Motivi.

To use a Motivo, two or three steps are necessary. The first, optional step, is to create a Motivo. The second is to apply the newly created Motivo or an Inkscape provided Motivo to an object. And the third is to adjust the Motivo as necessary.

Creating Patterns

Motivi are very easy to create. Simply select the object or objects you wish to use as a Motivo and then use the Oggetto Motivo Da Oggetto a Motivo (Alt+I) command.

After converting the selection to a Motivo, the original selection is replaced by a Rettangolo shape object filled with the new Motivo (and with an invisible stroke). This new object can be deleted but the Motivo will remain. Motivi have a life of their own.

The «tile» size of the Motivo is the total quadro delimitatore of the objects in the Motivo. If space is required around the objects, a non-visible rectangle object can be added or the Motivo size can be edited with the Editor XML dialog.

The object(s) in any Motivo can be edited by selecting an object that is filled with that Motivo and then using the Oggetto Motivo Da Motivo a Oggetto (Shift+Alt+I) command. The original objects will reappear in their original place (built-in Motivi will appear in the upper-left corner). After editing, the objects can be again turned into a Motivo. Both the old and new Motivi are available for use. Other objects filled with the original Motivo remain unchanged. The new Motivo must be «reapplied» to the object the Motivo came from.

Using Patterns

To change the fill of an object to a Motivo, simply click on the Pattern icon ( ) in the Riempimento e Contorni dialog. Then select the required Motivo from the pull-down menu. User created Motivi will be listed first.

Pattern dialog.
Pattern section of Riempimento e Contorni dialog.

Unfortunately, there is no preview of the Motivi (as with the Gradiente tab).

[Nota]Nota

If you want a Motivo to transform with an object, you must toggle on this option using the icon that is in the Controlli Strumento when the Strumento Selettore is in use.

[Avvertimento]Avvertimento

Motivi are not exported to PS and EPS files via the old export routines and are exported incorrectly to PS and PDF files via the Cairo routines (Bug).

Adjusting Patterns

Adjusting Motivi is done by a set of handles. The handles will appear when an object with a Motivo fill is selected and the node or one of the shape tools is active. The handles will appear on the original objects that defined the Motivo, or the former location of those objects if they have been moved or deleted (unless the Motivo has been previously adjusted). In the case of built-on Motivi they will appear in the upper-left corner of the canvas. The following figure shows the location of the handles for a Motivo that has not been adjusted.

Pattern example.
A Motivo (right) with an object filled with that Motivo (left). The translation handle is a "×" overlaying a Rectangle shape handle. The size handle is a square and the rotation handle a circle.

To adjust the origin, scale, and orientation of the Motivo, drag the translation handle (×), scale handle (square), and rotation handle (circle). The translation handle can conveniently be dragged over the object with the Motivo fill. Holding the Ctrl key down while dragging will restrict the movement to the horizontal or vertical direction. The scale is governed by the distance between the translation handle and scale handle, the orientation by the relative position of the rotation handle with the translation handle. The following figure shows how the fill changed after the handles have been adjusted.

Pattern example 2.
A Motivo filled object (left) after adjusting the Motivo shown on the right. The Motivo was adjusted by dragging the handles shown.
[Suggerimento]Suggerimento

For SVG viewers that don't support clipping, you can crop a bitmap by turning the bitmap into a Motivo and using it to fill an arbitrary path.

A demonstration of cropping a bitmap image.
A demonstration of cropping a bitmap image. Left: Original image. Center: Image after converting to Motivo and using as Motivo for circle. Right: Image after enlarging and shifting Motivo.

Hatchings

Inkscape now includes many Motivi that can be used as hatchings. If you need to create a new hatching here is the general procedure. The simplest hatching is to group two rectangular boxes, one with black fill and one with no fill as shown below.

Creating hatching.
The hatching Motivo on the left (surrounded by the dotted line) has been used for the star's Riempimento. The Motivo consists of two rectangles in a Gruppo.
[Avvertimento]Avvertimento

Inkscape has problems properly displaying Motivi at the Motivo boundaries. Inkscape export to a PNG also has problems. To work around this problem, you can make the Motivo rectangles wider than the maximum width needed to fill an object. Firefox, Opera, and Batik will display patterns without artifacts. Batik can be used for producing a high-quality PNG.

Fill Rule

The Fill Rule dictates what areas are filled when a path overlaps itself or one part of a complex path surrounds another part. The rule applies only to the Riempimento of an object (and not the Colore contorno). One can choose the Fill Rule from the two choices:

  • Even-odd.

  • Non-zero.

The difference between these rules is demonstrated in the following figures.

Fill rule even/odd vs. non-zero.
Fill rule: Even-odd vs. Non-zero.

Even-odd rule.  In this rule, you start outside the path with the number zero. Every time you cross the object's path, you add one to the number. If the current number is odd, the region is inside the path and therefore colored. If the current number is even, the region is outside the path and is not colored.

Fill rule even/odd.
Fill rule: a demonstration of counting. Even regions are outside the path, odd regions are inside.

Non-zero rule.  In this rule, you start outside the path with the number zero. Every time you cross the object's path with the path going to the left, you add one to the number. If the path is going to the right, you subtract one. If the number is non-zero, the region is inside the path; if it is zero, the region is outside the path.

Non-zero, direction of path.
Non-zero fill rule applied to a path consisting of two sub-paths. Zero regions are outside the path; non-zero regions are inside the path. The arrows on the paths show the paths' direction.