Alert + list to RGB colors (InDesign)
Hey everyone!
I work with documents (indesign) that are intended for printing. Therefore, my color swatches should be in CMYK format. I have the code to convert RGB colors to CMYK, but I was looking for something more elaborate.
I would like a script that can scan my document and identify any RGB color swatches. If any RGB swatches are found, the script should generate a window with a list of the offending colors. Finally, the script should prompt me with a YES or NO option to convert the colors to CMYK.
Can anyone help me with this?
The code to convert:
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};



