Inkscape 0.48 Illustrator's Cookbook
上QQ阅读APP看书,第一时间看更新

Different color icon sets using RGB Barrel

"Do a barrel roll!" Peppy, in 'Star Fox' for the 90's SNES gaming console..

Inkscape comes with several extensions that change the object color according to a certain set of options and conditions. These extensions can be found under the menu Extensions | Color. It is easy to guess from their names what each of them does (Grayscale, Less Light, More Saturation).

In this recipe we will use the RGB Barrel extension to very quickly create several copies of the same icon but with a different overall color palette.

Getting ready

The icon we are going to experiment on is a group of two objects, one is the icon background in the shape of a rectangle with rounded corners, and the other is the icon sign itself. The background object is styled with a three-stop blue gradient to give it more depth and the icon is white so it will be intact after the encounter with the RGB Barrel.

Open the RGBbarrel.svg file accompanying this chapter, the icon is there ready to be RGB-barreled.

How to do it...

The following steps will show you how to copy an icon, using RGB Barrel:

  1. Select and hold the blue icon with the Selector tool (F1) and hit Space to make a copy.
  2. Drop the original icon next to the new one (it will stay selected).
  3. Go to Extensions | Color | RGB Barrel.
  4. Select and hold the red icon with the Selector tool (F1) and hit Space to make a copy.
  5. Drop the icon next to the new one (it will stay selected).
  6. Go to Extensions | Color | RGB Barrel, the end result should look like the following:

How it works...

The RGB Barrel extension takes the object colors and changes their hue by shifting it 120° around the color circle. This way blue colors turn into red, red into green, and green back into blue, so there are never more than three different items in a RGB Barrel set.

If the object is styled with a gradient all gradient stops will be transformed one by one. Since icons are often made according to this principle, this tool makes it easy to create an icon set with a large range of colors. Our icon is styled with the shades of the same color, but it works the same on all kinds of color combinations:

There's more...

If you don't like the colors you end up with you can tweak them with other tools and try RGB Barrel again. Other color extensions can help with the tweaking as well as the Tweak tool (Jitter colors).

See also

For more information refer to the recipe on Changing icon colors using tiled clones in Chapter 4.