I need to create a series of shapes that have a gradient applied to only part of the shape (many of these shapes wrap around, so I can’t just put the gradient on part of it). To do this, I’ve cut the shapes, and put a gradient on the part that I want. This is fine, until some of the shapes need to have the opacity set to less than 100%. For whatever reason, a line shows up at the edge between the gradient part and the non-gradient part.

I’ve checked to see if there’s any overlap between the parts (since they have opacity set to 50% here, I thought maybe they were slightly overlapping,) but dividing the shapes further does nothing, so it seems there’s no overlap. Is this a glitch in Illustrator, or am I missing something?

The line is still there when I save the image as a jpg, png, etc.

I tried cutting the shapes by math a path on top of the shape and using "divide", and I also tried by using the scissor tool. Same edge either way.

Picture is below, the edge line is very faint but visible.

enter image description here

  • I cannot replicate this - are the shapes filled with RGB or CMYK, are you rendering transparencies at the highest setting? are you nudging one shape over slightly? is the solid colour shape set to opacity or tint (does this make a difference in your output?)
    – Mark Read
    Commented Nov 29, 2017 at 0:24
  • Based on a quick experiment, its the transparent objects that render the little 'crack' appearance - try using tints instead.
    – Mark Read
    Commented Nov 29, 2017 at 0:30
  • It happens regardless of whether I try it in RGB or CMYK. I'm definitely not nudging the shapes at all, I do the color swaps as soon as I divide the shapes, and I double checked that there's no overlap by seeing if the intersect pathfinder does anything-- but nothing, there's no overlap. The color of both shapes is set to the same shade of black, but the solid color part is 50% opacity, and the gradient goes from 50% opacity to 100% opacity (but all black). I unfortunately can't use a tint instead of opacity for this project as I will have to overlay these on other images. Thank you!
    – Victoria R
    Commented Nov 29, 2017 at 16:00

2 Answers 2


It's possible to add a linear gradient along a stroke in Illustrator and thus avoid such problems altogether.

Basically, make a stroke, suitably thick. Select the path in the Appearanace panel, and open the Gradients panel, and add it to the stroke - select Linear, and click the icon for "Apply Gradient Along Stroke".

enter image description here

  • Thank you! Unfortunately this option won't work with some of my shapes that are much more complicated than this example shape I posted.
    – Victoria R
    Commented Nov 29, 2017 at 16:02
  • @VictoriaR Then have you thought about using gradient meshes perhaps? I don't think trying to match up different shapes is going to work well. Better to apply gradients to a single shape where possible.
    – Billy Kerr
    Commented Nov 29, 2017 at 16:13

It's a really irritating one. The 'fix' is to group the objects first and then apply the transparency to the group (rather than have two independent transparent objects).

Likely cause: The cause appears to be antialiasing. Illustrator antialiases each of the objects separately creating a thin line where the semi-transparent antialiased edge pixels overlap each other. This isn't an issue in (most) opaque objects because the edge pixels are likely the same colour as the object itself.

  • Thanks! The problem is the gradient itself varies in opacity-- the blackest part is 100% and the grey part is the same color, black, but at 50% transparency. Is there a way to do your 'fix' considering the gradient varies in transparency?
    – Victoria R
    Commented Nov 29, 2017 at 15:50
  • Ah, I see. In that case, could you instead set the shape as a full shape the gradient area as a 100% black to 0% black overlay? Commented Nov 29, 2017 at 19:56
  • No, because the shapes are complicated and often wrap around themselves. If I do the gradient on the whole shape, I end up getting a gradient on part of it where I don't want the gradient to apply. For example, in the above shape, if I just want one end of the "C" to be 100% but the rest of the shape to be 50% opacity, setting the gradient over the whole shape makes both ends 100% rather than just one end of the C.
    – Victoria R
    Commented Nov 29, 2017 at 20:59
  • I know what you mean. The gradient area could be the exact same shape as your current gradient area - it would just act as an overlay for the whole shape (rather than the shape being split in two). The whole, underlying shape would be 50% grey. The overlying gradient area (a small chopped out portion of the shape) would them be coloured with a gradient of 100% black to 0% alpha black (or grey if you prefer). Does that fit your artwork? Commented Nov 29, 2017 at 21:05
  • Design is part problem solving and part compromise
    – Mark Read
    Commented Dec 2, 2017 at 4:21

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.