Script to convert all colors to CMYK Process?
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Script to convert all colors to CMYK Process?
- This topic has 13 replies, 9 voices, and was last updated 5 years, 4 months ago by Charlie LaBrecque.
-
AuthorPosts
-
-
September 7, 2010 at 7:00 am #56941Cindy KelleyParticipant
Does a script exist that can convert all spot colors to CMYK Process. Seems I am having to convert colors in every document before packaging.
Thanks for the script info or any other work around out there :)
cindy in indy
-
September 7, 2010 at 7:52 am #56942David BlatnerKeymaster
I don't know of a script, but that is pretty easy to accomplish with the Ink Manager. Just turn on a checkbox and they all get changed. Yes?
Oh, but you're packaging, not printing or exporting…. hm… interesting. Yes, I can see how that would be helpful to have a script that just converts them all.
-
September 7, 2010 at 8:52 am #56943Theunis De JongMember
I wonder if this is enough:
app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK, model:ColorModel.PROCESS};Save a copy of your document before, and check everything after running!
-
September 9, 2010 at 2:41 am #56952Cindy KelleyParticipant
Jongware to the rescue, as usual :)
but,
I used your Select Code button and pasted the text in AppleScript Editor but it wouldn't let me save due to a syntax error.
I pasted in Extendscript Tookkit.app and saved it to my Indesign CS5 scripts folder, restarted Indesign, created a new doc, they some spot color objects on it, ran the script and it worked.
Many many thanks.
-
September 9, 2010 at 7:39 am #56956Theunis De JongMember
Yeah, sorry — I accidentally left out what it was for. This is Javascript, which is something entirely different from Applescript; they might as well be two different languages. Oh wait — they are :p
The AppleScript Editor can only handle AppleScript; with the ESTK you can edit lots of different programming languages, but fortunately its default setting for new documents is … Javascript! (A lucky escape for me, there!)
I prefer Javascript over AppleScript — both scripting languages have their strengths, but Javascripts single huge advantage is the same script works on both Mac OS X and Windows versions of InDesign!
AppleScript, on the other hand, only works on OS X. I've said on a few occasions the third supported option, VBScript, has no good points at all – but that's just me. Anyway, VBS only works on Windows.
(Edit:)
.. saved it to my Indesign CS5 scripts folder, restarted Indesign ..
You don't have to do that! Next time you save a script into the Scripts folder and go back to InDesign, you will see it's already there, in the Scripts panel!
-
June 16, 2015 at 1:50 am #76004Nilesh ParmarMember
Thank you, works great with Indesign CC 2014. How could I get the ‘Name with Colour Value’ check on too within the Swatch options?
-
June 23, 2015 at 2:52 am #76163Masood AhmadParticipant
Jongware, I had a script with me which deletes all the unused colours. I inserted your script code at the end of that script to do the following and it worked great:
1. Add unNamed Colours
2. Delete Unused Colours
3. Convert Colours to CMYK ProcessI renamed it:
Swatches_Add-UnNamed_Delete-Unused_Convert-2-CMYK-Process
The script is here including your one line code;
#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};-
November 7, 2018 at 12:34 pm #111366Charlie LaBrecqueMember
@Masood Thanks for the thorough script that does exactly what I want! And thanks to everyone for their contribution.
I’m curious if there’s a way for the script to also rename those colors (ie PANTONE, user-defined) to the CMYK values.
-
-
October 4, 2017 at 7:10 am #98545
Hi.
I need to convert all process swatch colors to an specify color. Black 50%
Is ti possible?
Ps. Indesign CS6
Thanks
-
October 4, 2017 at 8:42 am #98554David BlatnerKeymaster
Luis, what do you mean by 50% black? Are you trying to convert spot colors to process colors? Or change one color to another color?
-
October 4, 2017 at 10:26 am #98564
Hi, David.
I am trying to transform all swatches process colors to only one color (black 50%) and to preserve a spot color.
even if delete all replacing is only 50% black process and preserve the spot color
That’s it.
-
October 4, 2017 at 10:43 am #98565David BlatnerKeymaster
One way to do this is by changing your color swatches to “spot colors” and then using ink manager to alias them to another spot color (50% black) and then tell that 50% black spot color to convert to process in the Ink Manager. I describe this here:
https://creativepro.com/alias-one-color-swatch-to-another.php -
October 4, 2017 at 1:05 pm #98579Michel Allio for FRIdNGEParticipant
David,
The best way to do it is to let Laubender finish it for free on Adobe InDesign Scripting !? :(
https://forums.adobe.com/thread/2112648
(^/)
-
-
January 23, 2018 at 11:49 pm #101173Matt MartelMember
Jongware, I just had to join this site so I can thank you. Brilliant little piece of code that probably save me two hours work across many, many documents.
Cheers.
Matt
-
-
AuthorPosts
- You must be logged in to reply to this topic.