Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

Line

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

share|improve this question
up vote 9 down vote accepted

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

share|improve this answer
    
Totally forgotten about that. Good answer. – KMSTR Jul 16 '12 at 14:53
    
thanks, I appreciate it! – Chris Jul 16 '12 at 15:03
    
Genius! Thank you SO MUCH!!! – turtle Jul 16 '12 at 15:03

You could add a gradient to the stroke in Illustrator CS6.

Simply set gradient stops to overlap each other by entering the same values in the "Location" field for multiple stops.

gradient

share|improve this answer

After searching for the same solution I came up with my own solution which works exactly as I need it.

1) Create two lines. On the second line use the "Dashed Line" function in the Stroke palette.

2) Select both lines. In the Align palette, select the Vertical Align Center (top row, second from the right.)

3) In the Brush palette, from the dropdown menu, select "New Brush". Create this as an "Art Brush".

4) Draw a line and select the newly created brush.

enter image description here

share|improve this answer

If you want to use this effect repeatedly and consistently, look up custom brushes. You can achieve some really great results there and you can use that same approach throughout your art with no duplicated effort.

share|improve this answer

This can be achieved by snapping the anchors to a grid as well as the handles that control the curves. The handles should also be identical or near identical for both endpoints.

enter image description here

share|improve this answer

Draw a single line... and then I would copy just the line segment (Direct Select) and paste in front - the new pasted path is in the same position - just recolour it. I guess if you need to control where the colour changes add points to the path so the segment/s is/are correct.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.