Hello,
I have been looking for a while and I can't find a way to make it automatic.
I currently do the lines by hand and it takes ages so I would like to have an automatic way to draw those lines.
I have a pre defined list of colours (base colours and stripe colours) that I would like to pick from.
Is that something possible to do?
Thanks,
Alex
Multicolor bezier line
Re: Multicolor bezier line

Welcome to InkscapeForum!
Do you mean the 2-color dashed lines? I think my 1st approach would be pattern along path. That failing (there could be distortions around acute angled curves), I might look at Fill and Stroke > Stroke Style > Dashes. If you had a solid color line of 1 color, below a dashed line of the other color, you could fairly well achieve what you want. However, to edit the line, you'd have to remember to select both paths at the same time. Grouping them might be 1 way to keep them together, but it really only facilitates moving the whole line. If you just need to move a node, you would either not group them, ungroup them, or group them and enter the group to make the node selection. To move a single node, you would really be moving the same node of each path. With the Node tool, select both paths, then drag a selection box around the pair of overlapping nodes. Thus, they move together, as if they were 1 single path.

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Multicolor bezier line
Thank you for your prompt reply !
Yes it is purely for two colour dashed lines.
I apply your method of dashed lines and it works fine !
- I draw a Bezier line
- Change the colour by pressing Shift + colour (for the base)
- Ctrl + D to duplicated exactly the line
- Ctrl + Shift + F for the Fill and stroke menu
- Stroke style -> select the appropriate dashed line
- Change the colour by pressing Shift + colour (for the stripes)
- Job done
Don't need to group as I don't need to move them around
I looked at the patterns, to use a list of pre-defined base colours and stripe colours, but it seems over complicated and the result might not be as good.
I created also a palette for the bases and stripes colours in order to be consistent (total of twelve colours according to the Defence Standard 61-12 for Cables).
Thanks again!
Yes it is purely for two colour dashed lines.
I apply your method of dashed lines and it works fine !
- I draw a Bezier line

- Change the colour by pressing Shift + colour (for the base)
- Ctrl + D to duplicated exactly the line
- Ctrl + Shift + F for the Fill and stroke menu
- Stroke style -> select the appropriate dashed line
- Change the colour by pressing Shift + colour (for the stripes)
- Job done
Don't need to group as I don't need to move them around
I looked at the patterns, to use a list of pre-defined base colours and stripe colours, but it seems over complicated and the result might not be as good.
I created also a palette for the bases and stripes colours in order to be consistent (total of twelve colours according to the Defence Standard 61-12 for Cables).
Thanks again!
Re: Multicolor bezier line
Until a swap palette extension or multiple stroke path style comes out,
a way to fasten the style setting of the strokes are:
Draw paths with the style you want to use,
then select one of them that you want to apply on a stroke.
Press Ctrl+C, then select the line you want to change it's colour, and press Ctrl+Shift+V.
The most useful method for those multicolour lines is to draw them
from one solid one and a dashed line on top.
a way to fasten the style setting of the strokes are:
Draw paths with the style you want to use,
then select one of them that you want to apply on a stroke.
Press Ctrl+C, then select the line you want to change it's colour, and press Ctrl+Shift+V.
The most useful method for those multicolour lines is to draw them
from one solid one and a dashed line on top.
- flamingolady
- Posts: 687
- Joined: Wed Jun 10, 2009 1:40 pm
Re: Multicolor bezier line
If the output is ok to be rasterized, the I'd use a repeating gradient.
My biggest wish is for vector gradients, oh, Aladin, my dear genie - my first wish is for vector gradients in Inkscape - rub, rub, rub, and Shazam, wish granted? (LOL)
My biggest wish is for vector gradients, oh, Aladin, my dear genie - my first wish is for vector gradients in Inkscape - rub, rub, rub, and Shazam, wish granted? (LOL)
Re: Multicolor bezier line
pivic wrote:I looked at the patterns, to use a list of pre-defined base colours and stripe colours, but it seems over complicated and the result might not be as good.
Oh no, when I mentioned pattern along path, those aren't the patterns that are used. Those are fill patterns. There's a way to make a custom pattern, and have it repeat in various ways. So you would have a short red path and a short yellow path, end to end, and then use pap to make it repeat.
But if you don't need to edit the lines, it sounds like the Dashes approach will be the best

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design