Illustrator script to add colors from selected object onto artboard as swatches?

I’m looking for a way to add color chips, along with their color name onto the artboard based on a selected object.

I work in textile and print design, need to create a mill-sheet listing out every color chip used for each print to communicate with the factories overseas as to how it would be printed. Currently we make a swatches file, by drawing a box, filling it in with desired global swatch, and labeling it with the text tool – for every single color used. And to make mill sheets, it involves copying and pasting the color boxes we need. This is very time consuming.

In a perfect world, I’d like a script that would allow me to select an object on the artboard, run the script, and have color chips with names below them appear on the artboard.

Does this kind of thing seem possible to do with Illustrator scripting?

Thank you in advance.

Answer

Use “renderSwatchLegend.jsx” from John Wundes (www.wundes.com)

It’s very close to what you want, in that it will output the swatches to the artboard; except not for a selection, but rather for every swatch in the swatches panel.

Because it’s not selection-based, you may need to delete unused swatches from your swatches panel before running the script.

Download the script: https://raw.githubusercontent.com/johnwun/js4ai/master/renderSwatchLegend.jsx

Run a script help doc:
https://helpx.adobe.com/illustrator/using/automation-scripts.html

Attribution
Source : Link , Question Author : Funosaurus , Answer Author : MG_

Leave a Comment