2.8 Styling

Any object in Inkscape has some style. Style is a complex thing that includes many separate properties, from the color of the fill to the width of the stroke and to complex SVG filters that totally alter the way the object looks. Let’s look at the basics of changing the style of objects.

First of all, you should have guessed by now that the style-changing actions, as any other actions in Inkscape, always apply to the current selection. That is, before you change the style of something, you must first select that something.

Once you select the objects you want to style, the simplest thing to do is just click the color palette at the bottom of the canvas. The color you click becomes the new fill color of all selected objects. Even if the object had no fill at all (like a path created with the Pencil tool), it becomes filled with that color too. (Note that you can scroll the palette to the right to see more colors than fit the screen.)

Setting fill or stroke from the color palette

Figure 2-15. Setting fill or stroke from the color palette

You can just as easily change the stroke color of the selected objects: Simply -click instead of clicking a color. Again, if some objects have no stroke, they will get it now.

Now, pay attention to the complex control in the lower-left corner of your Inkscape window, on the left end of the status bar. This control (shown in Figure 2-16) is called the selected style indicator, and in full accordance with its name, it indicates the style of the selection (actually, it only shows the most important style properties; there’s much more to an object’s style than shown in this indicator). To put it simply, here you can see the fill and stroke colors of the selected objects.

Selected style indicator

Figure 2-16. Selected style indicator

Perhaps more importantly, here you can also change these style properties. One very common operation is removing the fill or stroke from selected objects. Just middle-click the Fill (top) or Stroke (bottom) swatch to do this, or right-click the corresponding swatch and choose Remove from the pop-up menu. Note that an object with no fill and no stroke is completely invisible: You can’t see it and you can’t click it to select (although you can drag the rubber band around it to select it).

Apart from the fill and stroke colors, one important style property is opacity. Think of stained glass which has its own color but still shows through what is behind it; this is how objects with opacity less than 100% behave in Inkscape. (Obviously, an opacity of 0% makes an object invisible.) Opacity is changed by the O: control in the selected style indicator. Try selecting an object which is on top of other objects and type in a different opacity value; notice how the object becomes semitransparent.

Changing opacity

Figure 2-17. Changing opacity

If you just want two objects to have the same style, this is easy to do. Select the first object and press ; this places a copy of the object on the clipboard. Then select the other object (or objects) and paste the style of the clipboard object onto them by pressing . This is the easiest way to make multiple objects look the same.