Faking irregular gradients in inkscape

The question was asked in the jabber room if it was possible to make a gradient follow a path.
While strictly speaking its not, it is possible to fake it fairly well.
This is a very quick and dirty outline of how….

Step 1. Create your path.
irreg1.png
Step 2. Duplicate it, and move it up a little (were creating a ‘thick’ version of it.)

irreg2.png

Step 3. Connect the 2 curves - Duplicate the original again, Select both, do ctrl+K to make them into one path, then connect the nodes at either end so you have one shape.

irreg3.png

Step 4.  Repeat the first 3 stages, but move the second line to where you want the far end of your gradient.
put the relevant fills on the 2 shapes to be the start and end of the gradient, and remove the strokes.

irreg4.png
Step 5. Use the interpolate effect to blend between them. Use method 2 and turn on blending of styles. Make sure the thin ones on top of the thick one.


irreg4-5.png

Step 6. And your done…. if you find you get messy edges like below, clip paths are a god send…

irreg5.png

3 Responses to “Faking irregular gradients in inkscape”


  1. 1 Molumen October 21, 2006 at 8:10 pm

    Hi!

    Can I post this tutorial on http://www.inkscapeforums.com with a link to your blog?
    Please mail me your answer.

    Thanks!

  2. 2 link141 July 3, 2007 at 8:34 am

    Awesome tutorial!! I substituted connecting the two curves with converting the stroke to a path, and applied a blur (with a clipping path) to the finished group. This produced a “perfect” gradient with no messy edges or interpolation artifacts after running the script. I was also using Inkscape on Kubuntu Linux (if it makes a difference :p). Thanks for posting!

  1. 1 A tutorial by simarilius: Faking irregular gradients in inkscape « the inkscape tutorials blog — a big list of cool inkscape tutorials… Trackback on June 21, 2007 at 1:42 am

Leave a Reply