Copy link to clipboard
Copied
I regularly do prepress work for large projects that will have RGB colors and/or spot colors. These documents should have been designed only using process CMYK, but hey, designers are designers, so I need to fix them. I know I can convert manually in the palette or via ink manager, but was wondering if anyone has a script that will do that for me on an open, active indesign document. That would be so much quicker as I can just run that as a default on all documents.
Thanks.
Hi,
Try tis code:
var myDoc = app.activeDocument;
app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK};
app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK, model:ColorModel.PROCESS};
Copy link to clipboard
Copied
Hi,
Try tis code:
var myDoc = app.activeDocument;
app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK};
app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK, model:ColorModel.PROCESS};
Copy link to clipboard
Copied
Just to clarify, since don't write script, is this JS or apple script?
Copy link to clipboard
Copied
Hi,
This is JavaScript..
Copy link to clipboard
Copied
Thanks! I will try this at work tomorrow. 🙂
Copy link to clipboard
Copied
Holy Crap! This is great! Thank you so much!
Copy link to clipboard
Copied
Hi bfrankphoto,
are the result CMYK values as expected?
Regards,
Uwe
Copy link to clipboard
Copied
Yeah, it does. I just did a test with several RGB colors and a couple pantone spots, made a note of the CMYK equivalent. All of them came out correctly after the script ran. Well done Ananth@desgin
Copy link to clipboard
Copied
For better use var myDoc = app.documents[0] instead of var myDoc = app.activeDocument;
Copy link to clipboard
Copied
Hi tpk,
Thanks for your better ideas. It will helpful for me.
Thanks for your wonderful support!!!!!!.
Thanks,
Prabu G
Copy link to clipboard
Copied
Hi, I would like to have a modified version of this.
I need to have everything converted to CMYK, leaving PMS spots untouched. I just need to get rid of RGBs and Labs via scripting. Is it possible?
The thing arises from an issue I have in a specific document. The publisher is using an automated proprietary "Q-checker" plugin to verify the document, and the plugin says this document "does not contain only CMYK or SPOT colors" meaning there's something hidden that is still in RGB or Lab. Thing is, it's not a linked file, because Indesign's own preflight function won't find anything. I also already tried to use the swatches palette to add unnamed colors, but nothing comes up. I'm at a loss.
It may be a locked, invisible object in a group, almost certainly anchored in text. It's thousands of these and I can't check them all by hand.
Thanks.
Copy link to clipboard
Copied
If images have RGB images, even with spot coloros, the correct way is to keep them in RGB and never convert them before exporting the INDD file to a PDF.
Copy link to clipboard
Copied
Hi Ananth2,
First of all thanks for the scripts, it was working great uptill the 2020 version came in, i tries to fiddel things around, but no luck, can there be a similar script for indesign 2020 version ?
Copy link to clipboard
Copied
You don’t really need a script—select all of the swatches and set the Color Type and Color Mode to change all.
Copy link to clipboard
Copied
I found Javascript on another site which works in the most recent version. It's a culmination of 2 users posts, Jongware and Masood Ahmad, so credit to them. It removes unused colours, adds unnamed colours and converts all to CMYK:
#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};
Further to this, I'd like to ask if anyone knows how to keep a particular colour as a spot, say for example the colour CUTTER. Currently I have to convert all the colours with this script then go back and make the CUTTER a spot again, so I'd like a failsafe way for the junior team members to avoid any issues when sending print files to production.
Appreciate any help.