I have two line segments: one with a black stroke and one with a red stroke. Both have a stroke weight of 0.25pt.

I'd like to joint the two paths and treat them as a single path, but with the two different colours. However, when I join them with the Cmd/Ctrl + J shortcut, the two segments fuse together and the stroke colour is changed to black in both.

Now, is it possible to achieve such a desired effect? Any smart workaround?

  • No at such, hit control+g to group them this is the closest you can get. (there is no funtuional benefit of being able to do this). Buit illustrator can put gradient on path or make use of a art path that is 2 colors that would do it nut again it gets decomposed to something not a line anyway. So shouldnt have any benefit beyond group.
    – joojaa
    Mar 23, 2020 at 11:56
  • 1
    Hi Ni-Ar, thanks for the question. I took the liberty to copyedit your question a bit for legibility. If you feel I butchered anything beyond recognition, feel free to edit again or roll back my edits.
    – Vincent
    Mar 23, 2020 at 12:11
  • You can't. A single path can only have one stroke and one fill. You can group two paths together though.
    – Billy Kerr
    Mar 23, 2020 at 15:23

1 Answer 1


In principle, any single stroke can only have a single colour attribute at any one time. As joining creates one stroke out of two, this is true for the end result.

However, a gradient is also a 'colour attribute', and it's possible to cheat using a gradient that has a very sharp turnover.

  1. Select your joined stroke;
  2. In the toolbox, click the stroke icon so it's selected rather than the fill;
  3. Get your gradient palette, using Window > Gradient or Ctrl/Cmd+F9;
  4. In the palette, click the gradient example square on the top left to apply this gradient to your stroke;
  5. Click the second 'stroke' icon in the Gradient palette to apply the gradient over the length of the stroke;
  6. Drag colour stops from your Swatches palette onto the gradient bar in the palette to add the desired colours as necessary—delete colour stops by dragging them downwards off the palette;
  7. End up with a gradient with two colour stops;
  8. Drag the two stops as close together as they will go; use the 'location' field to fine-tune if necessary;
  9. Find the sweet spot where the effect replicates a sharp colour switch exactly in the location you want.

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.