Gradient along a path

mmumboss picture mmumboss · Mar 12, 2013 · Viewed 10.9k times · Source

Is it possible to create something like this in inkscape? I have been searching and trying for quite some time, but so far no results...

So what I am looking for is a gradient which follows the direction of the path it is applied to.

Gradient along a path http://coreldraw.com/cfs-filesystemfile.ashx/__key/CommunityServer.Components.PostAttachments/00.00.02.07.23/GradientBlend2.jpg

Answer

Stockfisch picture Stockfisch · Mar 13, 2013

I am not aware of a solution that perfectly satisfies your needs however here is one approach to get close:

  • Draw a line, open the Fill and Stroke dialog and set the width of the stroke (Stroke style tab) to 50. Transform the stroke to a path (Path > Stroke to Path).
  • Fill the path with a linear gradient (Fill and Stroke dialog > Fill > Linear gradient) and choose any colours you like.
  • Select the node tool (F2) and a line will appear stretching the area of your shape (marked with an exclamation mark on the picture below). Adjusting this line may help you to fine tune the gradient (however, strictly speaking it will not follow the path but a rectangle defined by the start and end marker of the marked line)

This should work for simple shapes that do not reverse. Let me know if this is good enough or if you need more detailed instructions.

enter image description here