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.
I am not aware of a solution that perfectly satisfies your needs however here is one approach to get close:
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 and Stroke
dialog > Fill
> Linear gradient
) and choose any colours you like.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.