• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign Script to Convert All Colors to Process CMYK

Participant ,
Mar 21, 2017 Mar 21, 2017

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.

TOPICS
Scripting

Views

5.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Mar 21, 2017 Mar 21, 2017

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};

Votes

Translate

Translate
Engaged ,
Mar 21, 2017 Mar 21, 2017

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};

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

Just to clarify, since  don't write script, is this JS or apple script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

Hi,

This is JavaScript..

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

Thanks! I will try this at work tomorrow. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

Holy Crap! This is great! Thank you so much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

Hi bfrankphoto,

are the result CMYK values as expected?

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2017 Mar 22, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

For better use var myDoc = app.documents[0] instead of var myDoc = app.activeDocument;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 23, 2017 Mar 23, 2017

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

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2019 Jun 30, 2019

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2020 Jul 18, 2020

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2020 Jul 18, 2020

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 ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2020 Jul 18, 2020

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.

 

Screen Shot 2.pngScreen Shot 3.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 19, 2023 Sep 19, 2023

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines