Hoping someone can help as this is driving me mad.

I have an initial opaque shape, which will be filled in a light grey: opaque shape

I'm using a duplication of the shape to fill with gradients to lay on top. I want to create a very subtle gradient along the edge of the shape all the way round using a slightly darker grey, to create a subtle depth to the shape.

I've tried using multiple linear gradients on the same shape using the appearance panel. As follows, this is what happens which doesn't look right as the gradient doesn't follow the shape edge: enter image description here

I've tried playing around with the freeform gradient tool, using both points and lines. Lines doesn't work because it only curves (a lot?!) and won't follow the outer edge of the shape. Plus the gradient would run along the line from opaque to grey which wouldn't create the subtle rounded cylindrical tube shape look I am after: enter image description here

I can't see a way in which to use the 'points' option on the freeform gradient tool, as this means assigning each 'point' to the darker grey colour, but I can't see how to make the middle of the shape transparent (I'm planning on having text running along the first opaque shape that shows through the transparent middle of the duplicated gradient-filled shape):

enter image description here

The best work around i found that gets close t the look I am trying t achieve was to use the freeform gradient tool and the 'lines' option to draw lines around the edge of the shape assigned to the darker grey shaded colour, and to then create more 'lines' using the freeform gradient tool along the centre of the entire shape and assign the points to 0% for transparency. Here's this highlighted: enter image description here And the finished effect: enter image description here

I posted the same question on the Adobe forums but the answer that came back was to create a gradient along a path to use as a fill for the shape, which doesn't work because a path does not replicate the altering angles of its edge of the shape as it curves in different directions.

Was what I did the best/only way? It seems complicated and not very accurate or professional!

Thanks for reading and your patience.

Example for Luciano:

enter image description here

  • 1
    Well, the gradient does not need to be that path;) – joojaa Oct 21 at 14:21
  • I don't know what you mean - please elaborate? – Molly Oct 21 at 14:46
  • 1
    Welcome to GDSE! +1 for describing your problem in details as a new user. – Wolff Oct 21 at 17:01

I would simply create a thick stroke and apply the gradient to the stroke....

enter image description here

Then, if shapes are needed, it can be expanded to a Gradient Mesh object.

enter image description here

If you require the slight corner rounding, then merely stack 2 objects. A shape to include the corner rounding, then a stroke slightly thinner than the shape with with the gradient. When colors are the same, the stroke will visually blend to the shape and be indistinguishable.

enter image description here

You can even do this with a transparent-color-transparent gradient on the stroke. So that, to alter the object color, all you need to do is change the flat fill color of the underlying shape.

enter image description here

For me, the stacked gradient stroke method offers the easiest editing and optimal control.

See here: Complex gradient object with transparent center if you are unfamiliar with adding transparency to gradients within Illustrator.


Try with Blend.

enter image description here

  • Delete the end paths

enter image description here

  • Blend the two resultant paths (they must have the same amount of points and no fill)

enter image description here

  • Expand the blend and blend again each path separately


  • Use the Direct Selection Tool to select each path and change the stroke color


  • Hi Danielillo, Thanks for getting back to me! When you say 'two paths' which two do you mean? Do I start buy drawing out multiple paths (as in your left hand illustration) and then select two of them to blend? Which two? Any two? Thanks so much! – Molly Oct 21 at 14:48
  • Answer updated with the info – Danielillo Oct 21 at 14:55
  • Lovely. Sorry I've never used the blend tool, so I'm assuming it produces the extra paths in your illustration when you 'blend'. And each blend path you can edit directly. Thanks so much for your time and answer, perfect :) – Molly Oct 21 at 14:59

The most flexible solution is a Pattern Brush. This is what joojaa meant with "the gradient does not need to be that path" - the gradient is simply a pattern applied to the path.

  1. because Illustrator doesn't accept gradients in brushes, you need to create a blend object. Draw 3 rectangles and fill them with the colors of your pipe + shadow profile.
  2. Blend Tool (W) and click on each rectangle in sequence, like this: enter image description here
  3. Drag the blend object to the Brushes panel (F5 if it's not open) and select Pattern Brush
  4. Adjust the settings for the corners enter image description here
  5. draw a "spine" for your pipe - a single open path with no fill
  6. Select the brush on the Brushes panel to apply to your pipe: enter image description here


  • you can easily change the colors of the gradient later
  • you can easily change the shape of the pipe afterwards
  • you can apply the same pattern to other objects
  • Wow this looks awesome! Can this be done in CS6? – Molly Oct 21 at 15:11
  • Thanks so much for the explanation - one thing, in step 4, does the Brushes panel auto generate the examples you show for the corner etc? – Molly Oct 21 at 15:12
  • @Molly yup, works as far back as I can remember :) Corners are auto generated, but you might need to change the type of corner. Adjust the settings if it doesn't look right. – Luciano Oct 21 at 15:12
  • So Luciano, Blend tool doesn't seem to be working. Because I wish for the centre of the pipe to be transparent, I've made two block colours and one central transparent one. When I try your steps, the bottom solid blends into the central transparent easily, but the top solid colour remains so and doesn't blend? – Molly Oct 21 at 15:49
  • - have added image to demonstrate :) – Molly Oct 21 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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