-
1. Re: Color Swap Between Libraries: Is this Possible?
CarlosCanto Nov 12, 2011 1:55 PM (in response to ChuckB39)yes, it is possible, I mean, it seems possible...do you mind posting a file I can play with? CS4 if you can, please.
-
2. Re: Color Swap Between Libraries: Is this Possible?
ChuckB39 Nov 12, 2011 5:58 PM (in response to CarlosCanto)Thanks Carlos. Here are a couple links. I am at home so I dont have access to art files but I can make a couple example files up real quick just for you to play with with the colors, etc. and also get a better idea visually of what I am referring to. Both files are identical when it comes to the objects, shapes, etc that they contain - same with what I am experiencing at work - except they will be a lot more complicated.
http://www.megaupload.com/?d=ET2NZ73G - this one contains all Pantone Coated Colors
http://www.megaupload.com/?d=NZKW6MXE - this one contains all Pantone Color Bridge CMYK PC colors
Again what I am wondering is if there is some way to create a script that could do a find and replace of sorts - if you open these two files you will see what I mean. I definitely appreciate the assistance here.
-
3. Re: Color Swap Between Libraries: Is this Possible?
CarlosCanto Nov 13, 2011 9:47 PM (in response to ChuckB39)Hi Chuck, I was half way with the script...when I thought.....can't we use recolor?
see if this works for you
- select all your art
- click on "new color group..." in the swatches panel
- add your "cmyk pc" swatches, select them all and make another group
- rearrange the colors so they match the same positions as the "coated" group
- with all your art still selected, go to Edit->Edit Colors->Recolor Artwork...
- click on the "cmyk pc" color group on the right
- click ok, and presto
-
4. Re: Color Swap Between Libraries: Is this Possible?
ChuckB39 Nov 14, 2011 5:20 AM (in response to CarlosCanto)Ah yes - that is one option among several but I probably am not explaining myself very well - my fault, its sort of difficult to explain.
Me and another individual will often be working with a large number of files a day that we will be switching these colors to PC and then back to Coated. That was the reason for the interest in scripting/automation.
The example file (Coated) that I gave you was just to give you an idea as to how the colors might be in the original file - the PC example file would be how they would appear in the finished file after changing the colors in the original file. The PC example file was just to show what I wanted the end result of the colors to be (eg same numeric values but CMYK PC).
The Pantone colors I picked were just random for example. Every job we get in has completely different ones.
I know I can manually drag the colors in and match them and then do a merge or recolor (again all manual) I just didn't know what options there were when it came to scripting - just how flexible it was in something like this.
-
5. Re: Color Swap Between Libraries: Is this Possible?
CarlosCanto Nov 15, 2011 12:10 AM (in response to ChuckB39)unfortunatelly, the scripting capabilities of illustrator are very limited...we don't have more or better tools, scripting is not more flexible than the UI either. Half the features can not be scripted, period...that being said...what's keeping you from using recolor? does it give you the correct results...but it is just too tedious to build the color groups? or it does not work for you at all. Based on what you said and the sample posted, you can go from coated to PC and back to coated at anytime with a couple of clicks, once you have your color groups.
before we continue with the script if we have to...how do you do it manually now, without a script?
-
6. Re: Color Swap Between Libraries: Is this Possible?
ChuckB39 Nov 15, 2011 5:08 AM (in response to CarlosCanto)You are correct recolor does work. It is basically the same as what I (we) are doing now.
Currently, I am taking the coated file and loading in the PC equivelents then merging each of the colors. It just takes a few minutes usually to do this then check everything over.
Multiply this for each file that we have to deal with over a day (going back and forth putting them in merging and if need be converting them back) and we start adding up a lot of time. That part gets frustrating. Hence this past weekend a couple of us got to wondering if there might be some way to script this function.
However maybe there isn't a way to do this- like you said the scripting abilities are limited, I completely understand if there isn't. I just thought I would ask and see.
Thanks again for your help.
-
7. Re: Color Swap Between Libraries: Is this Possible?
CarlosCanto Nov 15, 2011 2:23 PM (in response to ChuckB39)no problem, I'll keep going with the script...I'll keep you posted.
-
8. Re: Color Swap Between Libraries: Is this Possible?
Muppet Mark Nov 16, 2011 3:35 AM (in response to CarlosCanto)The scripting capabilities of Illustrator in this department (color handling) are very limited by comparison to Indesign… No loading of libraries and merging swatches here… Unfortunately… Given the nature of what a lot of people use this app for this is a big disapointment…
-
9. Re: Color Swap Between Libraries: Is this Possible?
ChuckB39 Nov 16, 2011 5:16 PM (in response to Muppet Mark)Understood. Thanks for the reply Mark.
Carlos, thanks for all your trouble, if we cannot do a auto-load/swap like discussed then there is no need to continue. I appreciate the attempt though.
Best regards.
-
10. Re: Color Swap Between Libraries: Is this Possible?
Katrina12345 Feb 26, 2014 10:08 AM (in response to ChuckB39)It is now 2014 and I need this exact same scripting ability. I need to change a square filled with Pantone Coated to Pantone Bridge Coated. Is this yet a scripting possibility?
-
11. Re: Color Swap Between Libraries: Is this Possible?
JoshK105 Feb 26, 2014 12:58 PM (in response to Katrina12345)Depending on how much work you're trying to save, this script might help. The difficulty lies in that you have to break down the new Pantone into CMYK values to be able to script the color change. I created this script to swap out a Pantone swatch in over 100 files for me. So it's probably not worth the effort for just a few files, but for a larger batch it could be helpful:
var myOriginalColor = "PANTONE 1395 U"; //The name of the swatch you want to change
var myNewColor = "PANTONE 620 U"; //The name of the color you are swapping in
var myNewColorDetails = new CMYKColor(); //CMYK values for the new color
myNewColorDetails.cyan = 44.5960164070129;
myNewColorDetails.magenta = 40.0823950767517;
myNewColorDetails.yellow = 81.8265020847321;
myNewColorDetails.black = 14.1054391860962;
var myDocument = app.activeDocument;
var myNumberSwatches = myDocument.swatches.length;
for (var j=0; j<myNumberSwatches; j++) //Checks to see if my new color already exists as a swatch and deletes it if it does exist
{
var mySwatchIndex = myDocument.swatches[j];
if (mySwatchIndex.name == myNewColor)
{
var myCheckSwatch = myDocument.swatches.getByName(myNewColor);
myCheckSwatch.remove();
j = myNumberSwatches;
}
}
var mySwatch = myDocument.swatches.getByName(myOriginalColor); //Grabs the swatch that is being replaced
mySwatch.color.spot.color = myNewColorDetails; //changes the swatch to the new color
mySwatch.name = myNewColor; //renames the swatch to match its color
-
12. Re: Color Swap Between Libraries: Is this Possible?
Katrina12345 Feb 27, 2014 7:36 AM (in response to JoshK105)Thank you Josh.
You nailed my problem when you stated that "the difficulty lies in that you have to break down the new Pantone into CMYK values to be able to script the color change".
What I am manually doing is filling a line of squares with (first square) a Pantone Spot Coated color, and then the following squares with the CMYK mix from the various Pantone libraries attempting to find the closest CMYK match (visually) [second square is the straight mix of the original Pantone Coated color, third square is the Pantone Bridge Coated CMYK mix for same color, fourth square is the Pantone Bridge Uncoated CMYK mix for the same color]...I'm doing this using both the Pantone libraries used for CS5 (which includes a European mix) and CS6. (The color bridge numbers can vary between CS5 and CS6, ergo, more possibilites to match the color visually)
This is time consuming manually, but a good number of CMYK mixes to visually compare to a pre-printed sample I'm trying to match. I have multiple samples I'm trying to match. Since all the mixes involve using the provided Pantone libraries in Illustrator, I thought there might be a way to do this by scripting.
It appears that's not possible since scripting doesn't seem to be able to open a library and choose a swatch using the same Pantone number.
-
13. Re: Color Swap Between Libraries: Is this Possible?
CarlosCanto Feb 27, 2014 10:13 AM (in response to Katrina12345)It appears that's not possible since scripting doesn't seem to be able to open a library and choose a swatch using the same Pantone number.
an alternative to this would be to load ALL pantone libraries to a separate document, a script can then look for a given swatch there
-
14. Re: Color Swap Between Libraries: Is this Possible?
Katrina12345 Feb 27, 2014 11:31 AM (in response to CarlosCanto)Can you explain how to load a Pantone library as a separate document?
-
15. Re: Color Swap Between Libraries: Is this Possible?
CarlosCanto Feb 27, 2014 2:03 PM (in response to Katrina12345)create a new document, open a Pantone Swatch Library, select all swatches, drag to the document swatches panel, save your document. If this document is open, a script can search for a swatch.
-
16. Re: Color Swap Between Libraries: Is this Possible?
Katrina12345 Feb 28, 2014 6:12 AM (in response to CarlosCanto)How absolutely clever of you. That never would of occurred to me. Thank you for your help. I'm trying this now.



