How to smoothly transition from stroke to fill color?

Post questions on how to use or achieve an effect in Inkscape.
troodon

How to smoothly transition from stroke to fill color?

Postby troodon » Mon Mar 29, 2010 10:50 am

I have some shape, with the stroke one color and the fill another color. I would like there to be a smooth gradient from the stroke color to the fill color, so that the outside of the stroke is 100% stroke color and the inside is 100% fill color. The available gradients under "stroke paint" don't appear to enable this; does someone know how to do it? Thanks.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: How to smoothly transition from stroke to fill color?

Postby microUgly » Mon Mar 29, 2010 1:27 pm

You can't do it exactly the way you have in mind. You'll need to do it just using a fill.

If your shape is a circle, you can do it using just a radial gradient. Otherwise, you'll need to use interpolation. There is a brief tutorial here - http://www.inkscape.org/doc/interpolate ... te.en.html - (specifically the methods near the bottom of the page).

What you want to do is create two copies of your shape, one large and the colour you want the outside to be, and one small and the colour you want the inside to be. Then use interpolate the two.

Note that I haven't done this tutorial. It may be it is outdated and the method described is superseded by live path effects.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: How to smoothly transition from stroke to fill color?

Postby prkos » Tue Mar 30, 2010 1:14 am

You can also do it by blurring the object that has a stroke and a fill, experiment with the stroke width.

If you want the object to have sharp edges use a clip with a duplicate of the unblurred object.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

ivan louette
Posts: 215
Joined: Thu Aug 21, 2008 4:08 am
Location: Belgium

Re: How to smoothly transition from stroke to fill color?

Postby ivan louette » Tue Mar 30, 2010 4:37 am

prkos wrote:You can also do it by blurring the object that has a stroke and a fill, experiment with the stroke width.

If you want the object to have sharp edges use a clip with a duplicate of the unblurred object.


Try Filters/Blur/Blur Content

Or without using a stroke color try Filters/Shadows and Glows/Inner Shadow and set Offset to "0" and Flood to the colour you need.

ivan


Return to “Help with using Inkscape”