Applying a radial gradient to a bunch of lines in Illustrator
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.
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.
- 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.
- 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.
Arrange your layers so that your lines are in a single group above your gradient.
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).
- Appreciate your now colored line-work:
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: