In this tutorial, we will use the line drawing of a coffee mug, that we created in Part 1 to begin to learn how to use gradients and filters in Inkscape, to make the mug look realistic. It is written for an intermediate Inkscape skill level, so icons for common commands will not be shown. You should probably know not just the icons, but the keyboard shortcuts, if you use them, by now.
Note that realistic drawings take much more time, effort, and dedication to complete, in Inkscape. That’s because vector graphics editors are not really meant for this style of drawing. Raster editors are much better designed for this style. But realism is a good subject for introducing gradients and filters. So grab some coffee, and settle in to finish reading and watching this 4 part tutorial.
If you want to learn even more about gradients, check out Lesson 4.6 in Inkscape for Artists – Step by Step. And try Lesson 17 to learn more about filters.
- If you grouped your mug at the end of Part 1, then ungroup it now. Duplicate the line drawing, and set it aside. (This is just for convenience, in case things go horribly wrong or you just change your mind and want to try something different. Then you don’t have to click Undo a hundred times, or start all over 🙂 )
- For drawing in a realistic style, light and shadow are very important. First you should decide from where on your page the light will be coming from. For the examples in this tutorial, the light will be coming from left, and from behind us, as the artist. This means that the mug’s cast shadow (the shadow that is cast upon the ground or surface) will fall behind the mug and to the right. We’ll draw that shadow first.
- The images below show the edits that will be needed, to create a silhouette of the mug, which will become the cast shadow. You learned the basics for these edits in Part 1.
- Disconnect the top segment of the red outline, below left. But do not delete it.
- Flip it upsidedown and attach it back to the red outline, as you see below center.
- If your handle has several lines, they will need to be reduced to just 2 lines.
- Either Combine or Union the main cup and handle. Then you should be able to fill it with a gray color, and remove the stroke, creating a silhouette.

- With the Selection tool, duplicate the gray silhouette. Drag one of them and place it over the line drawing of your mug. (Save the other one for later, or just in case.) Display the rotation center of the silhouette, and drag it to the very bottom of the main cup, as you see in the red circle below left.
- Make the silhouette shorter, by approximately 30 – 50%. Rotate by approximately 20 – 30%. Then use the skew handles to make it look something like the example below right. (One skew handle is circled in blue, below.) Make sure the silhouette is on the bottom, in z-order.
- Fill the line drawing with whatever color you want, for your coffee mug.

Gradients
With the Node tool, select the main cup. Switch to the Gradient tool . Hold the Ctrl key and drag the Gradient tool horizontally from one side of the main cup to the other. It should look something like the image below, second from the left.

By default, Inkscape draws a gradient being fully opaque on one end, to fully transparent on the other end. The tiny square and circle are called end stops, and the blue line is the handle, although “stops” and “handles” are often used interchangeabley. We will be adding more stops and colors to the gradient, to create highlights and shadows.
The image above right shows what a gradient looks like in the Fill and Stroke dialog. In the area highlighted by a red rectangle, the additional stops will be shown in order, top to bottom. To the right of the red rectangle, you can edit each stop’s color values and/or opacity (alpha value). Although colors can be adjusted on the canvas as well, depending on your personal preference.
There are three ways to add or remove gradient stops, depending on which version of Inkscape you’re using. The screenshot below shows them.
- On the canvas, you can double-click on the handle (blue line) to add a new stop. Note that this feature seems to have been lost in version 1.4. But it works in earlier versions (although it is a bit tricky to get the mouse in the right place). To delete a stop on the canvas, highlight it (by clicking on it) and delete.
- On the right end of the Gradient tool control bar, click the Plus button
to add a new stop. Or click the Minus button
to remove a stop.
- In the Fill and Stroke dialog, at the bottom of the column of stops, use the Plus and Minus buttons.

- First, let’s make sure the gradient is fully opaque everywhere. Highlight the circle end stop by clicking on it with the Gradient tool , like the image below, second from the left. Then make it opaque. You can do that in a few different ways. For example, in the Fill and Stroke dialog, you can drag the A (Alpha) bar all the way to the right. Or set the O (Opacity) spinbox in the Style Indicator to 100.
- Since the cast shadow is behind the mug to the right, that means the highlight must be on the front of the mug to the left. So add a new stop, and drag it to proper location. See the image below, third from the left.
- Click on the new stop to highlight it. Then you can give the stop its own color, in whatever way you prefer. You can use the Fill and Stroke dialog, or click on a color in the palette, or even use the Eye Dropper tool to select a color from another drawing.
The highlight color that you see below right, might not seem quite right, but gradients tend to need a lot of adjustment, to get them just right. If you’d like to watch the video at the beginning of Part 3, you can follow as the author/artist adjusts the gradient, to create both highlight and shading.

If you get stuck on this tutorial, or have questions or comments, please feel free to visit our forum where you can ask for help. Or share your Inkscape artwork, or just visit and say Hello! To learn more about Inkscape, you might want to look at Inkscape for Artists: Step-by-Step. If you enjoyed this tutorial, you can find more in the menu at the top of this page.
Draw a Coffee Mug, Part 2 — Introduction to Gradients and Filters © 2025 by J Brynn is licensed under CC BY-NC-ND 4.0