1

I'm trying to apply a gradient to a bunch of individual lines to create the effect of the lines fading out and also changing color as you go round the circle, however, I need everything to stay editable so I can keep tweaking and don't have to spend 5 minutes every now and then turning it into a single object and apply a gradient.

Here is what I currently have.

my current situation And here is something similar to what I'm trying to achieve.

enter image description here

  • Can you provide an image of what the end goal is? Or perhaps something similar enough? – JohnB Jul 26 '16 at 4:05
4

If you want to color your lines with a single gradient without combining them in to a single object you could use your lines as an opacity mask on a single solid gradient. Editing opacity masks can be a bit annoying if you're not used to working with opacity masks but it is easy enough once you get used to it.

  1. Opacity masks work with grayscale values, so set up your lines as you would like in grayscale. You can use a simple black to white gradient as a stroke on the lines you want to fade out.

Monochrome line-work

  1. Create the gradient that will color your lines. I used a circular path with a large stroke set to a spectrum gradient but you can use anything, a raster image, a gradient mesh etc.

Gradient

  1. Arrange your layers so that your lines are in a single group above your gradient.

  2. Open the Transparency panel and with your lines and gradient selected click the "Make Mask" button, then check "Invert Mask" (by default, opacity masks work by showing everything that is white and hiding everything that is black, our lines are black so we want the opposite).

enter image description here

  1. Appreciate your now colored line-work:

enter image description here

You can edit the mask by selecting the artwork and clicking the mask thumbnail (the one on the right) in the Transparency panel to enter mask-editing mode. clicking the artwork's thumbnail (the one on the left) once you're done will exit mask-editing mode.

More info on using opacity masks in Illustrator here:

1

enter image description hereGo to Window > Gradient and set the strokes to "Apply grid along strokes", I guess thats what you are looking for.

1

An alternative option is to select all of the items you wish to apply the gradient to and then go Object > Compound Path > Make. Gradients will be continuous across a Compound Path.

The downside to this is that it can only apply one set of Fill and Outline settings for all the paths contained in a Compound Path, and it can sometimes do funky things with your outlines. You can overcome this fairly easily by making shapes the non-conforming parts then clean up stray anchors and whatnot. Let us know if you have any further issues with this, and good luck~!

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.