Skip to main content
Participant
July 26, 2025
Answered

[Illustrator Scripting Help] How to get only real separation channels (Pure CMYK and Spot Colors)?

  • July 26, 2025
  • 1 reply
  • 223 views

Hello everyone,

I am developing a prepress automation script in Illustrator. The goal is to generate a color control bar that includes only the actual ink separations used in the document. Specifically, I want to include:

Pure CMYK channels (for example, Cyan 100, Magenta 0, Yellow 0, Black 0)

Spot Colors (Pantone or any user-defined spot)

However, I do not want to include:

Blended swatches or decorative color combinations

Colors made by mixing CMYK values (unless they are 100 percent of one channel)

The problem is that Illustrator scripting does not seem to provide access to the same ink separation information shown in the Separations Preview panel. When I scan all page items and analyze fill and stroke colors, I end up collecting mixed colors that are not true separations. I also tried using doc.printPreferences.inkList, but that returns undefined in my version of Illustrator.

My question is: has anyone found a reliable way to extract only the real separations used for printing, just like what is shown in the Separations Preview panel? I am looking for an accurate method to detect only CMYK pure channels and spot colors, avoiding false positives from decorative or swatch-based colors.

Any insight or help would be truly appreciated.

 

Thank you,
Ezequiel

Correct answer Sergey Osokin

Where did you get activeDocument.printPreferences.inkList from? There is no such thing in the documentation for Adobe Illustrator, but there is for Adobe Indesign. You can scan ink in Adobe Illustrator, for example:

var results = [];
var inkList = app.activeDocument.inkList;
for (var i = 0; i < inkList.length; i++) {
  if (inkList[i].inkInfo.printingStatus === InkPrintStatus.ENABLEINK) {
    results.push(inkList[i]);
  }
}
alert(results);

 

1 reply

Sergey Osokin
Sergey OsokinCorrect answer
Inspiring
July 28, 2025

Where did you get activeDocument.printPreferences.inkList from? There is no such thing in the documentation for Adobe Illustrator, but there is for Adobe Indesign. You can scan ink in Adobe Illustrator, for example:

var results = [];
var inkList = app.activeDocument.inkList;
for (var i = 0; i < inkList.length; i++) {
  if (inkList[i].inkInfo.printingStatus === InkPrintStatus.ENABLEINK) {
    results.push(inkList[i]);
  }
}
alert(results);

 

Participant
July 30, 2025

Thank you so much! It works!