Color swatch mapping with presets for print production
I made this script using ChatGPT, it does mostly everything I need, but I ran into the issue that the option "Merge Swatches" in the Swatches panel, cannot be used/accessed with JavaScript.
I work as Prepress designer and I have to constantly change spot colors to match the swatches that the print operators need to match the colors the client need (Pantone match or paint swatches). Most of these colors are saved in an .ASE file and I have to manually merge them multiple times.
I thought my script was going to fix this for me until I hit that wall.
Can you guys make something like this that is reliable for the printing industry.
I would really appreciate.
Thanks!
-
Hector Abreu
commented
Actually if you look at my screenshot the 3 first CMYK values had to be remapped to PANTONE 199 C, that was a good example about not getting files with CMYK consistent from clients.
-
Hector Abreu
commented
Hey Egor,
My script has a library for auto-mapping and illustrator doesn't. this lead me to have to create my own script.
Sometimes clients will also send artwork with elements that are not consistent on the CMYK value so I have to keep updating the mapping for example:
0.100.100.10 or 0.100.100.12 , very subtle but i have had that issue then i need to update mapping and keep adding to the .JSON library
For example if I have 200 items for a stadium and they all have to be converted from CMYK to SPOT colour, my script saves me a lot of time rather than going color by color and doing " Merge swatches " , where my script fails is that documents with tons of vectors and transparencies can use too much memory and crash illustrator.
The reason I have this issue is because the clients will list colours as spot colours on their branding but send the designs as CMYK and I need these to be spot colours for our printers.
screenshots attached of the .JSON file
-
Hector, Recolor dialog allows to map selected colors to a chosen library, using the 'Limit' button... not in the same way your script does, with a clear informing, but just automatically. Why did you prefer to develop a script instead of using the built-in method?
-
I’d say very slim. Based on the activity here, the team rarely picks scripting requests these days, putting their effort in other areas.
I will create a request based on your report for you. -
Hector Abreu
commented
Hey @Egor,
Its been a while since I posted on this thread.
I manage to develop the script using ChatGPT, but my biggest road block is that the script has to read every single element in the document to remap the CMYK to the Pantone Colour.
The fastest way to re-colour multiple elements is to manually using "Merge Swatches" in the swatch palette.
What are the chances that Adobe will include the Merge swatches to the extend script?
See screenshots attached
New idea from comment
This comment was upgraded into a new idea: Give access to Merge Swatches command in ExtendScript -
Hector Abreu
commented
Update July 02 - 2025
- Big GUI improvements
- Better color matching and replacing logic -
Hector Abreu
commented
@Egor, I found a work around. but I would prefer if I could use the merging swatch option in the swatch panel, is faster than looking thru every element in the design.
-
Hmm, there is not much visual difference... Do you mean you were able to workaround the problem?
Script API doesn’t provide this functionality, true... A script can try to call an action that does it, but dynamically creating actions is prone to error... The script itself is interesting, but feels like a niche tool, so it’s good you are developing it. -
Hector Abreu
commented
so far i have improve this a lot more since my last post