BearAtSki
Illustrator Scripts title beside a row of color swatches
August 23, 2026
illustratorscriptsworkflow

Useful Illustrator Scripts for Everyday Production

A small collection of Illustrator scripts for turning HEX colors into swatches and gradients, plus a non-destructive shear and rotate tool.

Repetitive setup work is a good candidate for a small script. My Illustrator Scripts repository collects four .jsx tools made to remove a few of those repeated steps.

The scripts favor function over form. They were built for my own production work, tested with Illustrator CC and later, and shared in case they are useful to someone else.

Build a swatch group from HEX colors

addSwatchGroup.jsx takes a block of text containing six-digit HEX values and turns the colors it finds into an Illustrator swatch group. The values can be separated by spaces, punctuation, or symbols, so the input can come from a palette link, CSS, or another color tool without careful reformatting.

The dialog also includes an option to make the new colors global swatches. Each swatch is named from its RGB values, and duplicate names are handled automatically.

The Swatch Group from HEX Codes dialog in Illustrator

There is also a quicker clipboard-based version, quickAddSwatchGroup.jsx. It reads copied text, extracts the HEX values, and creates the swatch group without opening the input dialog.

Turn copied colors into a gradient

quickAddGradient.jsx uses the same clipboard-first approach. Copy text containing a series of HEX colors, run the script, and Illustrator creates a linear gradient with evenly distributed stops.

The script was written to work well with CSS copied from the Learn UI Gradient Generator. It reads the colors, not the CSS angle, so the gradient direction still needs to be set in Illustrator.

Shear without flattening the artwork

shearNrotate.jsx applies shear through Illustrator’s Transform effect instead of directly distorting the selected artwork. The result remains editable in the Appearance panel.

The script is an English adaptation of an existing script credited in the source. My version adds the option to rotate the selected objects by the shear angle, which covers the way I usually use the effect.

Get the scripts

The complete set and source files are available in the BearAtSki Illustrator Scripts repository on GitHub. The repository identifies adapted work in the source and makes the scripts available to use and share, but not to resell.