How to create line in Illustrator with multiple color segments?


I'm a relative novice with Illustrator and I am looking for the best way to make a line with multiple color segments. For example, here is my feeble attempt by just making three lines and trying to align them manually. I can not add an attachment as I do not have enough points yet, so here is a link to an example I created:


Notice that the segments are not connecting together smoothly. How can I make a line with multi-colored segments? Thanks for the help.

7/16/2012 1:51:00 PM

Accepted Answer

I think a simple way would be to use the scissors tool.

It is located in the same toolset as the eraser tool, click and hold that tile.

Then, click with the scissors where you want the breaks/color changes to take place... after cutting the path it should keep the line nice and smooth.

You can then easily change the color of each segment separately.

If you later decide to move the position, select both lines and then use cmd+J (join path) to stitch them back together. You'll lose the color, but you can easily cut the line again with the scissors and reapply it correctly.

You'll notice from the image below that you'll also get neat, straight lines at the join which are called the 'cap' of the stroke.

enter image description here

7/16/2012 4:50:00 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow