Adobe Illustrator CS6 has a new feature that allows users to apply gradients to strokes. Is it possible to do that in earlier versions? Today I'll show you how to apply gradients to strokes in previous versions of Illustrator.
By using the Appearance panel
Using the DrawScribe's InkScribe Tool or the Pen Tool (P), create an arbitrary path.
Increase the width of the path to 40 pt for visual purposes using the Stroke panel (Window > Stroke).
Select the object and go to Effect > Path > Outline Stroke.
Keeping it selected, create a group that will include the newly created object (Object > Group).
Open the Appearance panel (Window > Appearance) and create a new fill for this group by selecting Add New Fill from the menu of the panel.
Swap this fill with linear gradient.
In order to apply the fill to path only go to Effect > Pathfinder > Divide.
Let's take a look at a few options of editing the path with a gradient fill. Firstly, we can change the location of the anchor points and handles of the resultant object.
To change the shape of the profile, we can use the Width Tool (Shift + W) in Illustrator CS5 or apply a new stoke profile in earlier versions.
We can change the type of cap; apply the dashed line; use different profiles from the Stroke panel, and apply different types of brushes from the Brushes panel.
As you can see all these transformations keep the gradient fill associated with the path. However, this method allows you to fill strokes only with linear and radial gradients. If you are already familiar with the new features of Adobe Illustrator CS6, then you know that there are two more types of gradient fills of the paths. These are gradient along stroke and gradient across stroke. Can we create this type of path fill without using Adobe Illustrator CS6? Yes, we can. Next I'll show you how to do it.
By using the free Mash Tormentor plugin
Create a rectangle, and using the Mesh Tool (U) transform it into the Gradient Mesh which consists of several rows. Color nodes in different shades of gray.
Keep the object selected and create a gradient mesh for the brush using the Free Mesh Tormentor plugin.
Now drag the object to the Brushes panel and save the brush as an Art Brush.
Apply the created brush to a path.
Keep the object selected, go to Object > Expand Appearance.
Now transform the path into the Gradient Mesh, by pressing on the appropriate button in the Mesh Tormentor panel.
This is how we got a gradient across stroke.
If initially you create the Gradient Mesh which consists of multiple columns, you will eventually get the gradient along stroke.
Of course, with the release of Adobe Illustrator CS6 it became much easier to apply a gradient fill to a stroke. But if you continue working in earlier versions of the program, I think this article should prove helpful.