I have made a drawing with the pen tool. Most of the paths are unclosed. I would like to put a gradient stroke on the paths.

I don't seem to be able to join all of the paths together, which I assume is the first problem to solve. See below for my drawing.

my drawing made of paths

I believe if the strokes are all separate then at best I will gradient each stroke individually which will not give me the effect I am looking for.

I think it may also have changed because I used the shape builder to fill it originally. So perhaps that has made a difference?

I'm using Illustrator CS5. I have tried using Unite, Join, etc via the pathfinder.

I don't want to merge it into one shape, i want it to stay as a line drawing as the shape will never have a fill. My intention is to put a gradient over the entire line drawing so it looks like it is shimmering.

Here is an example of what I would like to achieve (made in Photoshop).

A gradient stroke

  • @WELZ I'm not sure that is right. I still just want it to be a line drawing so I don't want to join the shapes into one merged outline. But I am sure someone has asked this before. I just haven't found it when searching. I'll update my question so it's clearer what I've tried.
    – Eoin
    Commented Aug 15, 2018 at 13:36
  • 1
    Apply a gradient to the stroke instead of the fill? Did I misunderstand?
    – Welz
    Commented Aug 15, 2018 at 13:46
  • Yes, that is what I am trying to achieve. You cannot gradient a stroke in CS5 (not sure if you can in CC). The link you put shows how to merge two reflected paths into one single shape, which is not what I am trying to achieve. Perhaps the link is not the one you thought?
    – Eoin
    Commented Aug 15, 2018 at 13:57
  • Do you want all your paths to become one single path of an outline of a flamingo?
    – Welz
    Commented Aug 15, 2018 at 13:59
  • 1
    See these helpful posts.
    – Welz
    Commented Aug 15, 2018 at 14:11

4 Answers 4


Select all your shapes and set (fill and stroke) color to none and group them together

Then go to the appearance panel and click on the dropdown and choose add new stroke

Now just apply the gradient as the stroke.

  • Ok, so they were part of a live paint group. I removed them from that group and now my paths are grouped as one. But I cannot add a gradient to a stroke. It will not let me select a gradient swatch in CS5.
    – Eoin
    Commented Aug 15, 2018 at 15:12
  • Mind you this wont work in CS5
    – joojaa
    Commented Aug 15, 2018 at 17:52
  • 1
    @joojaa that is true, you just need to expand first.
    – Welz
    Commented Aug 15, 2018 at 17:53
  • @WELZ But the asker is asking how to do it without expanding
    – joojaa
    Commented Aug 15, 2018 at 17:56

CS 5 can not put a gradient on a stroke, later editions can. However you can keep the objects as lines and put a gradient on them at the same time with a little known hack.

  • Make a pattern with a gradient. It now possible to assign it to a stroke. You can then use the transform dialogs to rotate, translate and scale the gradient into place.

Illustrator CS5 doesn't let you put a gradient on a stoke...

My workaround is:

Duplicate the flamingo;

Expand it;

Now you can aplly the gradient.

You will have the original stroked under the copy with the gradient.


The key here for me (in Illustrator CS5) was to select everything and then go to Object > Expand Appearance then go to Object > Expand (and make sure ONLY the stroke option is ticked).

I used this tutorial https://astutegraphics.com/blog/how-to-apply-a-gradient-fill-to-strokes-in-adobe-illustrator-cs5-and-earlier/

Once the object is expanded it becomes a shape instead of a path and you can fill it. Once you can fill it you can use a gradient.

However, the problem that I had was the object when expanded did not cut at the anchor point.

Also to hightlight @WELZ excellent comment these answers are a better explanation.

See Example 1 Example 2 Example 3.

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.