With every new release of an Adobe product, you can expect at least one feature that seems to be just another small improvement, but which opens up whole new worlds of happiness the moment you use it. Illustrator CS6 has one such feature: the ability to put a gradient onto a stroke '" not just a fill. It's far more flexible than any old workaround, so let's take a look.
Note: Our brand new Illustrator CS6 101 course discusses this content in video form, along with everything else about the basics of lines, strokes, fills, shapes and more. If you're not already an Illustrator expert, go watch it!
I've used the Print preset here for a clean white background, but anything should be fine. While there are a few default gradients to be found in the swatches panel, it's worth creating one or two of your own now, to re-familiarise yourself with the gradient creation process.
If you start from grey, add many new pots, then move them randomly, you get this
Open the Gradient panel, then click on the Gradient Slider near the bottom of the panel '" the greyscale default gradient. Double-click on the a color pot, like the one on the left or right, then pick a new color.
When you click on a gradient's color pot, you see this
Click below the gradient to create a new color pot, or drag an existing color pot down to remove one. Each color pot contains a color and an opacity value, so you can make a rainbow with a series of color pots like this:
Note: Orange makes itself between red and yellow, and we'll skip indigo. Yes, it's in all the songs, but only because Isaac Newton believed in sevens. Really!
And this is a rainbow
Finally, create a swatch from your gradient by clicking the New Swatch button at the bottom of the Swatches panel, and calling it Rainbow.
Create a spiral, and give a stroke width of 20pt. If your gradient was already selected, it may have already been set as the stroke color. If not, choose it now, and set fill to none if necessary. Easy, right?
Here's a basic gradient on a stroke, on the default 'within stroke' setting
Looking again in the Gradient panel, you'll see a few new options. Next to the word Stroke are three icons, meaning:
Apply Gradient within stroke
Apply Gradient along stroke
Apply Gradient across stroke
For a real rainbow, you'll want it across the stroke. For many other 3D-ish effects, you'll want a chrome-style gradient along a stroke. Within stroke is least used '" this behaves in the same way as if you converted the stroke to a fill and applied a gradient to that.
An interesting side note with the Linear/Radial drop-down menu above: while Radial works as expected with a gradient within the stroke, it effectively works as a 'mirrored' gradient when applied along or across a stroke.
A double rainbow! Sort of.
Use these newly powerful gradients, set to along a stroke with variable width strokes to exciting effect. Try the tapered 'Width Profile 1' on your spiral to give it softer end points, for starters.
This is more like it '" a soft, rainbow-colored comet trail
If you create a circle, then set the width way, way up, you can get a sweeping gradient. When combined with a randomly-changing greyscale gradient, you've got a chrome button.
Is this a volume button?
Create a polygon, add a Pucker and Bloat effect, then add a gradient across a stroke. More complex shapes here can break up with complex gradients, so take this one a little easy.
Craziness with a bonus dashed line
Go on, tick that Dashed line box in the Strokes panel. Yes, it still works. And if you use the Variable Width tool? Yes, it still works, and lets you make some very nice pieces, too.
Just a few of the built-in width profiles
Gradients on strokes, then. Easy to grasp, hard to master, very useful. Let this one simmer in your brain for a little while '" it can take some time to really see its potential. Not a feature you want to miss.
Note: We'll be looking at the Variable Width tool in a follow-up article, so watch out for it!