This site aims to be the ultimate resource for Adobe Illustrator(c) scripting. Here you will find regularly updated collection of free scripts for all your creative needs.

If you find yourself doing the same task again and again, or you have an idea how to optimise your  workflow – get in touch, and we will provide solution.

Swatch Legend

The script renderSwatchLegend.jsx is a script to create swatch legend on artboard.

It automatically generates a color swatch legend inside the Illustrator document based on the currently selected swatches.

Here’s what it does:

  • Reads the selected swatches from the active Illustrator document.
  • Creates a group of rectangles (legend blocks), each filled with a swatch color.
  • Adds a text label next to each swatch that can include:
    • The swatch name (optional).
    • The color values in chosen color spaces: HEX, RGB, CMYK, LAB, or Grayscale.
    • Formatting options like uppercase HEX, with/without #, joined or split components, separators, and adjustable text size.

In short:
👉 It builds a visual and textual swatch reference table directly in your Illustrator document, useful for client presentations, documentation, or style guides.