draw a gradient line with a number of colors ...

Post questions on how to use or achieve an effect in Inkscape.
Eagle Brewing
Posts: 16
Joined: Sat Nov 28, 2015 5:31 am

draw a gradient line with a number of colors ...

Postby Eagle Brewing » Tue Dec 01, 2015 12:58 pm

Hello ...
I would like to make a line, say several points wide and a specified length that would include a specified number of colors.
For example, I would like a line that might be 8" long and would start at one end with the first color of the rainbow and go through all the colors to the other end of the line. Solid colors blending into the next, no opacity. divide the colors evenly through the line.
I was wondering if anyone knew of a tutorial or previous post that might help me here.
Or give me an idea of how to start this, which tool, etc.
I'm willing to read and figure it out.
Appreciate any help and thanks.
Bob

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: draw a gradient line with a number of colors ...

Postby Moini » Tue Dec 01, 2015 1:24 pm

Hi Eagle,

it sounds as if you already know how to add a linear gradient (Fill&Stroke dialog with Ctrl+Shift+F, then choose the third button in the first tab for a linear gradient).

Use the gradient tool (keyboard: g, third button from the bottom in the button bar at the left of the screen) to edit the gradient on-screen.
Double-click on the line that signifies the gradient to add another 'stop' (=color).
Select the color for this stop in the Fill&Stroke dialog while the stop is selected.
Move the stop along the gradient line by dragging it with the mouse.
Delete a stop with Del (when it's selected).

Manual (with slightly outdated info):
http://tavmjong.free.fr/INKSCAPE/MANUAL ... -Gradients

Tutorials links and other stuff:
https://inkscape.org/en/learn/

Keyboard reference:
https://inkscape.org/doc/keys091.html

Kind regards,
Moini
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: draw a gradient line with a number of colors ...

Postby brynn » Wed Dec 02, 2015 8:57 am

Note that you can only do it with a straight line. If the line is curvy, the gradient doesn't follow the curve. The gradient only goes in a straight line.

I seem to have the impression it can be done to a curvy line in GIMP, but I'm not really positive.

When you say "line", do you mean a stroked path? If that's the case, you'll want to use the 2nd tab in the F/S dialog (Stroke Paint tab) instead of the first tab.

But if you use a long, skinny rectangle, or you apply Path menu > Stroke to Path to the path, use the Fill tab of the F/S dialog.


Return to “Help with using Inkscape”