How to Use Basic Linear Gradients in Inkscape
By Stephen Bucaro
Inkscape is an amazing, easy to use, and powerful vector graphics drawing application,
similar to Adobe Illustrator. One of the most amazing things about Inkscape is that it's
brought to you for free by the Free Software Foundation in Boston, MA. One of the
most powerful things about Inkscape is that you can use gradients. Gradients can make
even the most crude drawings look professional.
A gradient is a gradual transition form one color to another color. But before we get deeper
into gradients, lets briefly describe how colors are defined by computers. Computers create
colors by defining the amount of red, green, and blue the color contains. Because computers
are binary, and because the first computers had small data storage capabilities, each color
is defined on a scale from 0 to 255. So, for example, the color blue would be encoded as
0,0,255 and the color white would be 255,255,255.
In Inkscape the beginning color and ending color of a gradient are each called a "stop".
You can transition from one color to another, and then to a third color. This requires 3 stops.
You can actually have any number of stops in a gradient.
To fill an object with a gradient, right-click with the mouse pointer inside the object, and
in the popup menu that appears, select "Fill and Stroke". In the "Fill and Stroke" dialog
box that appears, select the "Fill" tab. On the "Fill" tab, click on the "Linear gradient" button.
At the top of the "Linear gradient" section that appears you'll see a drop-down list of
all the linear gradients that have been defined.
You can click on one of the pre-defined linear gradients to apply it to your object or you
can create a new gradient by selecting a the pre-defined gradient (there is always one
default pre-defined gradient) and clicking on the [Duplicate] button.
You also delete gradient. First you have make sure the gradient isn't used anywhere on
the drawing. Then in Inkscape's "File" menu select "Vacuum defs".
If the "Fill and Stroke" dialog box is open, the gradients and colors defined in the dialog
box will be those of the object you select by selecting the "Select and transform objects"
tool in the left-side tool box.
Inkscape Gradient editor dialog box.
To edit a gradient, in the "Fill and Stroke" dialog box, on the "Fill" tab, click on the [Edit...]
button. The "Gradient editor" dialog box will appear. In the "Gradient editor" dialog box, one
of the gradient's stop color and stop id number will appear. Below that will be tabs for the
different methods of setting a color. You'll probably find the "Wheel" method the easiest to use,
but for this example I'm going to use the "RGB" method.
I set the color of one stop to R=200, G=60, B=30. Note you'll also see an "A" button, this
controls the colors "alpha" which sets its transparency, 0 being fully transparent and 255 being
fully opaque. I then selected the other stop in the drop-down list and set that stop to R=210,
G=170, B=24. Then close the "Gradient editor" dialog box by clicking on the "x" in its upper-right corner.