Create shiny candy designs in Inkscape

Moderate Inkscape Tutorial


I like to design in subtle shades and tight colour schemes, but sometimes you just want to break out the sunshine yellows and go crazy with something much more vibrant and eye-catching. And that's what we'll be doing in this Inkscape tutorial. We'll use a single colourful gradient, and a boatload of white and black highlights and shadows, to create a shiny fruity candy design with a sweetshop-style background. It's lots of fun and will add another powerful ability to your Inkscape toolbox.

Let's have a peek at what we'll be creating in this tutorial:

A vector lemon sweet created in Inkscape

It looks like there's a lot going on there, but whilst there's definitely a bit of work involved it's not hard once you've understood the technique. So without further ado, let's make a start.

Skills you'll be developing in this tutorial

Step 1 - Set up your canvas and create the basic shape

Open up Inkscape and head for the Document Properties dialog box, using File --> Document Properties or Ctrl, Shift and D on the keyboard. Assign a width and height of 250 pixels each. Make sure you've got Snap bounding box corners selected, and toggle the default grid on with the # key to help us out initially.

Set up a square canvas for your work

Activate the Ellipse tool with E on the keyboard and, using the grid as a snapping guide, draw a tall ellipse which is around 120 pixels wide and 200 pixels tall. Use the information bar at the bottom of the Inkscape window or the Ellipse tool's own parameters bar to check the size of this shape.

Position this shape centrally on your canvas using the Select tool, which can accessed using F1 on the keyboard. Simply click and drag it, allowing the ellipse to snap to where it needs to be.

Create the main sweet shape

OK, let's create the fill for this shape. I'm going for a lemon sherbet, so it's all about the yellows for me. Open up the Fill and Stroke dialog box with Ctrl, Shift and F, and click the Radial Gradient option on the tabs which appear. Hit the Edit Gradient button to open that pop-up.

In the box which appears, click the Add stop button once to change our two-stop gradient into a three-stop one.

Change the fill to a radial gradient

Use the dropdown box to select each stop of this gradient in turn, and change the fill colours to #f6ff00 for the first, #edcc0e for the second, and #e3b010 for the third.

Don't forget to hop down to the Alpha slider at the bottom and make sure it's all the way up in each case - a setting of 255 in the adjacent box. This will add ff on the end of each of your colour settings.

Generate the main gradient for the sweet

Using the Gradient tool handles (Ctrl and F1 to activate it), move the centre of this radial gradient over to the left of the ellipse shape slightly. Drag the two other stops outwards so they cover the full width and height of the shape. This will give us a sense of light and shade as we build up the illustration and can be changed later to produce multi-colour sweets!

Change the gradient's positioning within the ellipse

Step 2 - Add light and shadow to create outer relief

With the main shape selected, Duplicate it twice using Ctrl and D or Edit --> Duplicate in the menus. Bring up the Transform dialog box with Ctrl, Shift and M or by selecting Object --> Transform from the menus. Select the Move tab and enter 10 pixels in the Horizontal box, and -10 pixels in the Vertical box. Click Apply to execute the move action.

Move the topmost copy to offset it from the one underneath

Select the other duplicate shape and repeat the Transform process, but using movement increments of 2 pixels for the Horizontal and -2 pixels for the Vertical change.

Move the other copy to offset by a smaller amount

Keeping this shape selected, hold down the Shift key and click on the top duplicate, such that you've got two objects selected at once. Then use Ctrl and - or Path --> Difference from the menus to cut the top shape out from the copy underneath it.

Perform a Difference operation on the two duplicated shapes

We're use this nice crescent shape as a highlight, to create a hard, shiny appearance to our boiled sweet. Hop back to the Fill and Stroke panel and set the fill on this shape to be a solid fill of white, then click the Radial gradient button. Adjust the gradient handle positions and orientation so the fill doesn't quite extend all the way to the edges of the crescent and the clearest part of the fill is somewhere towards the top-left region of the shape.

Then use the master opacity slider to reduce the opacity of this shape to around 70%.

Create a shiny highlight for the sweet

Can you see how the bottom shape's main fill and the crescent highlight combine to give definition and the suggestion of height? Well it can look even better if we also add a shadow on the other edge. So, repeat the steps from above to create a crescent shape on the right-hand side of our sweet object. Duplicate the main shape twice and use the Transform box to move the duplicates precisely, then split them with the Difference command.

In case you hadn't worked it out already, you'll need to reverse the directions of the movement offsets, ie: -5 pixels and -1 pixel for the Horizontal changes; 5 pixels and 1 pixel for the Vertical.

Make the fill a black radial gradient and use a really low opacity for this object - just about 12% or so.

Add a shadow shape on the opposite side

Use our crescent fill technique again

Ah-ha! Looking good. I'm hoping you've got the hang of this highlight/shadow creation, because we're going to be using it a whole lot for the rest of the tutorial, too.

Step 3 - Create the inner dip of the sweet's contours

Start by making a single duplicate of the base shape, which will appear on top of your drawing. Using the Transform pop-up again, select the Scale tab and enter 60% in one of the settings boxes. Tick the Scale proportionally option (which will automatically set both the Width and Height scaling to 60% for you) and hit Apply to carry out the size change.

Create a smaller copy of the initial shape for the central bump

Duplicate the resulting shape - handily centred over the base object for you - and offset this top copy by 10 pixels Horizontally (which will be to the right), with a Vertical shift of 0 pixels. Apply a radial gradient, black fill here, and use the Gradient tool's handles to shorten the gradient path and fade out the pointed ends slightly. Set a reduced opacity on this item of 14%.

Use a black to transparent gradient over the middle sweet section

Where there is shadow, there is also light, of course. So repeat the procedure, and reverse the offset to create the opposite side's lit areas. You can duplicate this shape, flip it horizontally with the H key and move it manually if you're that way inclined. Again, you'll want to change the opacity for this shape - I find about 65% looks good.

Create the matching shadow section on the surface

Step 4 - Add more light areas to enhance the illustration

Just those four shapes, set to the right size and transparencies, have really given our sweet a lovely, smooth-contoured appearance. To take it further, we'll add extra light areas using both solid fills and gradients so the sweet looks like it's made of hard, shiny sweet stuff.

Start by swapping to the Pen tool (keyboard B) and clicking on 3 points of an elongated triangle, somewhere near the lower right edge between the raised part and the outer edge. Zooming in will help here. Close the shape, which will have straight edges at first. Using the Node tool (F2), hold Ctrl and click on two of the points to round the corners and turn the triangle into a tear-drop shape. You can also drag the curves the sculpt the shape.

Create a curved tear-drop shape over the body of the main shape

Give this shape a radial gradient fill which is white to transparent, and move the gradient handles so the 'drop' end of the shape is quite hard-edge, while the 'tail' is faded out slightly. Remove the stroke from the shape, of course. Change the opacity but keep it quite high - we want the light to contrast strongly with the shape below it to give that hard, shiny appearance we're after.

Change the fill of the curved shine shape

Add another one or two of these on the lit-side of the sweet, diagonally-opposite the first and over one edge of the middle, raised bump. Don't forget to use resize and rotation handles if your drop shape isn't orientated correctly with the curve of the sweet.

Add and position more curved shiny highlights

Add some small, shiny white spots (ellipses) around the edges, clustering them in twos or threes of slightly-differing sizes, again using quite high opacities such as 85 - 90%, to convey a smooth, reflective surface to our sweet.

Add a smattering of highlight spots around the sweet

For variety (and because it's fun and it's not often I get to do it), mix in a couple of star-shaped twinkles which fulfil the same goal as our white circles, using the Star tool. Use 5-cornered stars with a Spoke ratio of around 0.3, and dot these around the sweet illustration unevenly. Scatter them around the sweet and tinker with those opacities by tuning them to between 70% - 90% as you see fit.

Add a smattering of highlight spots around the sweet

Keep reviewing your design as you go - we want plenty of bright, sweet-looking twinkles in there but we don't want to over-egg the pudding, so to speak. Also, if your outer shapes now seem lost or too overpowering, adjust their opacity settings too.

This is an important part of any design process - nothing looks perfect straight away, however good your design 'recipe' is - so be critical but fair with your work.

Add some star-shaped sparkles to the sweet as well

Step 5 - Add some subtle imperfections to the sweet

The only thing is that our lemon-y sweet is looking a little bit too perfect at the moment. What we can add is a handful of black shapes at very low opacity to imply cracks inside the sweet. You know the ones I mean: it's where the sugar strands have split during the sweet-making process; you can see them below the surface.

Create these narrow, angular shapes with the Pen tool and set an opacity of about 4%, then zoom back out to see what I mean. It doesn't matter if they overlap with your previous shiny highlight objects.

Insert some black shapes for scratches or cracks

Step 6 - Add a suitable background

Finally, let's rustle up a background which fills the canvas, using the Rectangle tool. Drag it out, fill it with #349ced and send it behind our sweet with the End key. Duplicate this shape and give the copy a Pattern fill of White stripes 1:1 from the Fill and Stroke panel, reducing the opacity of this duplicate to 4% and moving it down through the stack to overlay the background (End then Page Up once to quickly do this).

Create a background and striped overlay

Absolutely finally, make a duplicate of our original sweet shape, and give it a solid, black fill. Push it behind the original but in front of the background with the End and PageUp / PageDown keys, and use the Blur slider on the Fill and Stroke panel to blur it by about 14 pixels at 30 -40% opacity. You'll end up with a soft shadow around your sweet to lift it from the background and finish the illustration nicely.

Use a blurred duplicate to back-light the sweet

Great work! A tasty-looking hard-boiled sweet, with plenty of sugary sparkles and a fruity appearance.

The strength of the technique is that we've still got just one object (plus its 'glow' counterpart) which has any actual colour assigned to it. That means we can very easily change the colour of the sweet itself and still get all the groovy shininess for free, simply by editing the gradient settings directly.

Have you found this tutorial to be a sweet treat, or has it left a bitter taste in your mouth? Let me know with a comment 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