In this blog post I'll briefly explain how to create a gradient fill in Inkscape. It's pretty straightforward, yet not exactly intuitive.

  1. Select a shape
  2. Open the Fill and Stroke menu (Shift+Ctrl+F)
  3. Open the Fill style tab
  4. Choose the Linear gradient option

Clicking the Linear gradient option will automatically fill the path with a gradient in which opacity changes from 100% to 0%. The gradient will be given a name ending in a series of random numbers (such as linearGradient3755).

The linear gradient option in the Inkscape menu

Changing the gradient

To change the gradient, click the Edit... button (now call Edit gradient).

The edit gradient button

This opens the Gradient editor along the top of the workspace. In older versions of Inkscape it opens up a separate window (see below).

Gradient edit toolbar

Gradients work by smoothly varying the colour between stops. By default, the first stop is solid black and the second stop fully transparent black (it has a checkerboard next to it).

Say you wanted a gradient from solid red to solid blue. First select the second stop from the dropdown to bring the Fill and Stroke menu for that stop. I don't know how to get this menu for the first stop first. Once you have selected the second stop, you can select the first stop and change its colour too.

Then you can set the colour by dragging the arrows or setting the numbers in the normal way. For example set R = 0, G = 0 B = 255, A = 255 for solid blue.

The gradient editor in Inkscape

You can use the 'Add stop' button to create more complex, composite gradients varying between multiple colours. In the newer versions of Inkscape this is the last button along the top with a plus over a square node.

Changing the angle of a gradient

To edit the angle and slope of the gradient, move the line representing the gradient on the shape. It has a circular node at one end and a square at the other. You can move these nodes to change where the gradient starts and ends, which can be inside or outside of the shape.

Example of changing the angle of a gradient

In older version of Inkscape you have to first select the shape, and chose the 'Edit path by nodes' tool (F2) in order to display this line.

The radial gradient basically works in the same way, only you can change the height and width of the ellipse formed by the gradient.