In this blog post I'll briefly explain how to create a gradient fill in Inkscape. It's pretty straightforward, yet not exactly intuitive.
- Select a shape
- Open the Fill and Stroke menu (Shift+Ctrl+F)
- Open the Fill style tab
- 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).
Changing the gradient
To change the gradient, click the Edit... button (now call Edit gradient).
This opens the Gradient editor along the top of the workspace. In older versions of Inkscape it opens up a separate window (see below).
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.
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.
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.