I have a sequence of thick segments of different colors, which overlap at the end points. It looks like this:

enter image description here

I would like it to look more like a single path, like so (note the change in the corners):

enter image description here

Is there a simple way to do this with illustrator? I can manually convert each segment to a rectangle, and then move their vertices to get that effect, but perhaps there is a more direct way?

  • 3
    Hm. Never faced before with such task :) Not sure that AI allows to colorize different segments of one path. I can suggest to convert your stroke into shape, slice with knife tool and colorize separately.
    – Vnovak
    May 27, 2014 at 11:57
  • 5
  • Yeah, nice solution @llan
    – Vnovak
    May 27, 2014 at 18:09
  • Thanks @llan. I assume you refer to using a gradient. However, I need the transition between colors to be exactly at the vertices, which is not simple to do with gradient.
    – roipo
    May 27, 2014 at 20:32

2 Answers 2


If it is a regular polygon, you can use Adobe Illustrator and the gradient as in the answer suggested by Ilan and set each pair of middle stops to be at the percentage defined by the division of 100% and the number of sides of the polygon.
In an hexagon, that will be 16.67%, 33.34%, 50%, 66.67% 83.34%. In trying to answer the question, I discovered that it works best if they are not in the exact same position so I gave a 0.01% difference to each middle stop, in this sequence:

  • Color A first stop: 0%
  • Color A second (middle) stop: 16.66%
  • Color B first stop: 16.67%

And so on.

For the gradient to reproduce the angular bisector, you have to select "Apply gradient along stroke" (please correct this if needed because I'm translating from the Spanish version of AI).

hexagon with gradient stroke

gradient pane


You can use rounded line caps (windows/stroke/cap) to get continuous (however slightly rounded) junctions, which is fine when all sections have the same colour.

enter image description here

  • Seems like you want to make a contribution, thank you. Please stay focused on the question to keep this forum from getting cluttered. You could improve your answer for example by showing what your idea would look like when you apply it to a colour example like the OP gave us. Making a colour example might give you new ideas towards a solution. If you find that your method does not even work for colour, then you might want to delete it. Dec 23, 2018 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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