Create long-shadow icons for Flat Designs in Inkscape

Easy Inkscape Tutorial

Introduction

Flat Design has been the big development to emerge in the web design world this year. Block colours, clean designs, line icons, geometric representations for UI elements, plenty of white-space, all of these have become synonymous with Flat Design, and designers everywhere have tried their hand at producing iconsets.

Early adopters went for the outright 'flat' sentiment in its purest form: no gradients or textures anywhere. But one of the natural evolutions of this seismic shift in design preference was to soften the harsh lines of icons' edges; lessening the severity of those block colours and geometrically-constrained elements. One of the leading examples of this is the so-called "long-shadow" variation, which is a 'flat' icon with an extended drop shadow much longer than conventionally thought of as 'normal'.

This tutorial is based around having a single icon image over a frame, both with long-shadows applied. That's kind of the 'worst' case scenario in terms of work, so hopefully any ideas of your own you go on to produce should be no more complicated than this.

Skills you'll develop in this tutorial

Here's the icon we'll be creating in this tutorial, which you'll be able to produce by the end.

A set of long-shadow icons created in Inkscape

Step 1 - Create your icon's basic elements

Create a new Inkscape document and in the Document Properties dialog box, which you can open with Ctrl, Shift and D or via File --> Document Properties, set a document size of 200 pixels square.

Create a new canvas for your Inkscape icon

Switch on Inkscape's grid using the # key - the default grid settings will be fine - then grab your Rectangle tool using the R key, or find its icon in the toolbox. Use it to draw a rectangle which is 60 pixels square, which you can gauge using the toolbar at the bottom of Inkscape's application window.

Begin your work with a 60 pixel square shape on a new Inkscape canvas

Open up the Fill and Stroke panel with Ctrl, Shift and F, set a fill colour for your square of #4bbbdb, and remove any stroke that may be on the shape.

Set the icon base's main colour

So with our icon's base ready, let's get onto creating the identifying image itself. To allow ourselves the maximum flexibility later, we'll do this on a separate layer above the current one. Open the Layers dialog box with Ctrl, Shift and L and add a new layer using the + button. Alternatively, press Ctrl, Shift and N or go to Layer --> Add Layer in the menus.

Create a new layer above this one for the icon's image

Time to draw our icon, then. Switch to Inkscape's Pen Tool with B on the keyboard, and click on a series of points which will be the outline of our mountain icon.

Create a basic mountain outline shape

Switch to the Node Tool (keyboard F2) and start moulding this mountain shape to be something a bit more like the well known Inkscape mountain with an inky base. There's plenty of scope for individuality here, of course, but I'll show you how I went about it.

Use the Node Tool to sculpt the nodes and add a curve to the mountain's slopes

The Node Tool is really powerful: you can re-shape any element on your canvas either by click-and-drag actions, or by selecting individual parts of it - including nodes of course - and using other options to alter them. By the way, you can also hold the Ctrl key down when you click on a node to cycle through the different types, which is often a quick way of converting corner nodes to smooth ones, and so on.

Once you're happy with your mountain shape, change its fill to black. Leave the stroke on the path for now.

Change the mountain's fill to black

Step 2 - Add detail to your icon design

Press Ctrl and D to create a duplicate of this shape, and change its fill to white. Then remove the stroke from this shape.

Change the duplicate shape's fill and stroke settings appropriately

It's useful to switch off the grid at this point, so we can be a bit more free-form with our shape-building, so hit the hash key #.

Activate your Pen Tool once more and draw a squiggly line that cuts across the mountain, somewhere around halfway. Click and drag each point so that they become curves this time rather than sharp corners. Once your curve is outside the shape, keep clicking to close a looped shape that goes around the top of the icon underneath it.

Create a shape that will become the snowy mountain cap

Activate Inkscape's Select Tool with F1 and hold down the Shift key while you click on the duplicate mountain shape. This should leave you with two objects selected at once. Then select Path --> Intersection or press Ctrl and * to make Inkscape produce a shape from the two overlapping segments.

Intersect the two shapes to leave a perfect snowcap

Now, I should've spotted it earlier, but I notice at this point that our original shape has got a mitred corner on it which is preventing it from looking smooth. As well as looking a bit ugly, it might cause us problems later, so let's fix it now by putting a setting of Rounded on the Stroke Style tab's control. Select the base shape again with the Select Tool and click that middle button on the Fill and Stroke panel. That way it will apply the setting to all this shape's corners, which is handy.

Round the base shape's corners in the Stroke Styles tab

Step 3 - Create an angled shadow for the icon

Keep this shape selected and make a duplicate of it like we did before with Ctrl and D. Then open up the Transform dialog box - Ctrl, Shift and M - or use Object --> Transform. On the Move tab, enter values of 30 for Horizontal and -30 for Vertical, tick Relative Move and click Apply to shift the top copy right and down by 30 pixels.

Offset the duplicate shape by 30 pixels to the right and downwards

Now to create the shadow itself. Hold down the Shift key and select the original mountain shape again so that it and your offset copy are both highlighted. From the menus, select Extensions --> Generate from Path --> Interpolate and enter these settings: Exponent should be 1, set Interpolation steps to 200 and Interpolation Method should be 1. Leave the check boxes unticked. Click Apply when you're done.

This will create a group which consists of 200 copies of our object, positioned from the start to end points. You can see this by selecting it and glancing at the infobar again.

Use the Interpolate function to create a smooth set of copies

We need to turn this group of copies into something we can easily use. So break this group up with Ctrl, Shift and G (or Object --> Ungroup), then unite them into a single object with Ctrl and + or Path --> Union. Because of the shape of the mountain's peak, the result will have a ton of non-critical nodes, so simplify (Ctrl and L or Path --> Simplify) the path to reduce this number, without ruining the shape's outline. I can get away with doing this twice on the same object to reduce the node count from 762 to just 12.

Use Simplify to keep your Inkscape objects easy to manipulate

It's worth noting that, depending on the shape you're using for interpolation, you may need many more or less than 200 steps to get a smooth result. It's often trial and error to get it right, but the process is still the same.

Now to change this shape's fill to a shadow gradient using the Fill and Stroke panel. Select the third icon from the left to add a linear gradient from black to transparent, which will reveal some other work we need to tidy up before moving on: it looks like we've got a spare mountain object from before the interpolation, and we need to remove the stroke from the shadow shape. Click on the shadow area once and push it down one level with the Page Down key or Object --> Lower, then select and delete the spare mountain shape.

Apply a linear gradient and tidy up the spare object on the canvas

Lovely. Next, activate the Gradient Tool with Ctrl and F1 and click on the shadow shape. Notice the gradient's start and end points are on the left and right edges of the bounding box. Really, we want the gradient to go in the same direction as the shape: at 45° downwards. Click and drag a gradient in this direction while holding down the Ctrl key, which will lock the angle to 15° increments and make your life easier.

Create a new, angled gradient on this shape

Push this gradient behind the main icon shapes by pressing the End key or by using Object --> Lower to Bottom. Then reduce its opacity to around 15% to make the effect much more subtle.

Lowering the opacity keeps the icon as the focus

Step 4 - Use Clipping to remove undesirable overhangs

At this point, you may be aware that we need to take care of the edges of the shadow which extend beyond the limit of the icon's base and overlap the background, as it should reach the edge of the square frame but not go beyond it. How strong the impact is depends how your gradient has come out, but if I put this icon against a differently-coloured background, you should be able to see what I'm talking about.

The shadow needs to reach the edge but not go beyond it

We can achieve this by using the icon base shape as a Clipping Mask. To make it, select the round-edged square, duplicate it, then press Shift and Page Up (menu option: Layer --> Move Selection To Layer Above) to move the duplicate onto the same layer as the rest of the icon details. Then press the Home key or select Object --> Raise to Top to shove it to the top of the stack of items on this layer.

Create a clipping mask for the icon detail's shadow

Next, select all the objects on this layer with Ctrl and A, and select Object --> Clip --> Set. This will perform a 'cookie cutter' operation on all the shapes (using the topmost one as the cutter) and confining the shadow within that border. Be aware that clipping effects all objects within the selection, even if they're on different layers, so watch out if you drag a selection area around your shapes - you'll want to lock the bottom layer first so that nothing there is affected.

Perform a Clipping operation on the icon shapes

Step 4 - (Optional) Add a long-shadow effect to the icon base

If you want to add a similar long-shadow to the base square, simply switch to the base's layer and repeat the steps above to do it. Important - the Interpolate function only works on objects which are Paths, so convert any Rectangles, Circles, Stars, or other standard objects to Paths first. Do this by using Ctrl, Shift and C or Path --> Object to Path.

How to add a long-shadow effect to the icon base

And using this systematic approach, you can create a whole suite of icons with a consistent set of long-shadows. The shadow's angle remains the same in each case, and because the base is on a separate layer, it's easy to copy, paste and alter it without it ever floating over the top of any of the detail items you create.

Long-shadow icon variations created in Inkscape

So now you know how to reproduce this popular icon style using our free and Open Source vector-creating friend, Inkscape. Have you enjoyed this tutorial? Or produced your own set of Flat Design, long-shadow icons after following these tips? Let me know in the comments section below.

Mark is the Editor and owner of Designmark Graphics Ltd. Publishing tutorial articles and guides for Inkscape and the GIMP, this blog aims to boost the profile of these Open Source graphics applications and showcase what they are capable of.

comments powered by Disqus

Connect with me

I'm on a range of social channels and, to get alerts as soon as new tutorials are published, subscribe to the RSS feed using the link below.

Search the site

Search the site for a topic or tutorial subject using the search box below:

What's this blog about?

The Designmark blog is the best online resource for Open Source Graphics software tutorials, showing you how to produce quality graphics in Inkscape and the GIMP. You can find out more about how this blog came to be and what's going on behind the scenes in this article.

Who's in charge here?

That would be me, Mark. You can learn more about me, my background and the design work I do on .

Things that built this blog