Question
Convert All Swatches to CMYK Process Global
Hi,
I have this working script with me which works well in InDesign. It helps me to (a) Add all Unnamed colors, (b) remove all unused swatches, and (c) convert all colours to CMYK Process.
I need a similar code for Illustrator with an additional check point. i.e. I want to convert all colours to CMYK Process Global swatch.
#target indesign
app.menuActions.item("$ID/Add All Unnamed Colors").invoke();
var myIndesignDoc = app.activeDocument;
var myUnusedSwatches = myIndesignDoc.unusedSwatches;
for (var s = myUnusedSwatches.length - 1; s >= 0; s--) {
var mySwatch = myIndesignDoc.unusedSwatches[s];
var name = mySwatch.name;
if (name != "") {
mySwatch.remove();
}
}
app.activeDocument.colors.everyItem().properties = { space: ColorSpace.CMYK, model: ColorModel.PROCESS };Can anyone help, please.
