: Is it possible to generate a gradient from color swatches? I am trying to generate two gradients using color swatches in Adobe Illustrator. It took me a very long time to find out that it's
I am trying to generate two gradients using color swatches in Adobe Illustrator. It took me a very long time to find out that it's possible to save the colors using "Add Used Colors", and as it can generate the swatches automatically, I was wondering: is it possible to generate a range of colors from the swatches?
I mean - is it possible to pick one color from the swatches menu, and another one, and using them generate a long gradient (including any color that is between the two)?
I already saved the range of colors that I want, but if there is any way to make my life easier and generate the gradient without really picking every color, it will be awesome.
I wrote a script that does that:
Illy Grad: Create gradient from selected swatches in Adobe Illustrator.
Apply your gradient to a shape (using the 2 colors)
Now go to Object → Expand and set it to the amount of colors you want (I did 15)
Right click → Ungroup and Right Click → Release clipping mask
Now click the new folder Icon in swatches panel (Window → Swatches) and make sure to select "from artwork" and it will make a folder of swatches using the colors from your gradient. (you will have chosen earlier exactly how many)
Draw to objects with a fill, some distance apart;
Make the fill colours of the two objects the two colours you want to know the intermediaires of;
Select both of them;
Choose the Blend tool (W);
Click an anchor on one of the shapes;
Click the corresponding anchor on the other shape;
Double click the Blend tool in the toolbox to change the blend's settings and change them to 'Smooth Color' if necessary. If it's a determined amount of intermediaries you're looking for, enter that number under the option 'Specified Steps';
Object > Expand the blend and Object > Ungroup if desired.
The resulting shapes will have all intermediate colours, which you can eyedrop and store in your Swatches palette at leisure.
You can add colors to a gradient simply by dragging the color swatch onto the gradient palette, on the gradient line.
If you want to remove a color from a gradient, drag it down from the gradient line.
Once your gradient is done, you can drag it from the gradient palette back into the color swatch palette to create a new swatch with the gradient.