Changing Illustrator Swatches from Spot/Book to Process/CMYK

Hi,

I have been trying to create the following applescript and not been having any luck.

I am trying to open my doc in Illustrator CC 2014 remove all unused swatches ( I have this done ) select all swatches except “White_Ink” and convert the color mode from Book → CMYK then Color Type from Spot → Process.

Any insight would be appreciated?

Well what I found out that is when you delete a spot from the swatch palette it automatically converts from “book” to a cymk process color. So I used the following script to keep the 2 I wanted and remove the rest. Unfortunately the spots are no longer listed in the palette anymore.

delete (every swatch whose (name is not “Dieline”) and (name is not “White_Ink”))

Hi. I don’t know what constitutes a “book” color, as my older AI version doesn’t have that feature.
Is it in the spot class? If so, what are its properties?

A book color is when you’re using a color out of a color book ex. Pantone Solid Coated. What version of Illustrator are you using?

Oh. I’ve always made my own colors, rather than load them from the swatch libraries, and, when you use that method, “book” is not an accessible option. You just need to change the type.

tell application "Adobe Illustrator"'s document 1 to set (spots whose name does not contain "White")'s color type to process color

Unfortunately I’m using files already created with Pantone book colors so the swatches are already there.

My code sample addresses your problem.

That code does not work if your swatch is a defined “book” color, as “book” disables the color type options. Yours only works if it a “CMYK” color mode and Color type “Spot”

I solved my issue with another way.

Under CS3, a book color is in the spot class; I tested my code with several different book colors from the libraries, and it worked as expected. If it didn’t work under your version, it would be helpful to post the event log from your test and/or the properties of the target, as was previously requested. It is also customary to post an alternative solution.

CC is different.

hyptonic or anybody else who might have the solution,
Can you please post your solution? I am having difficulty as well, trying to convert a swatch’s color mode from Book → CMYK then Color Type from Spot → Process. Using Illustrator CC 2015.

Thanks in advance,
-Jeff

hi Jeff,

I never found an exact solution but I found that if I deleted all my swatches that were in spot colors it would automatically convert them to process. I wanted to keep my dieline and white ink though as spot.

delete (every swatch whose (name is not "Dieline") and (name is not "White_Ink"))

Hope this helps a little.

Hello Hyptonic,
Thank you very much, this does help. Ultimately I would prefer to retain any swatches that it could possibly convert to process successfully.

I played around with this a bit more and this script appears to delete any “Book” swatch. But it should convert any other non-Book Spot Color swatch to process and leave it within the swatch palette.

-Jeff

tell application "Adobe Illustrator"
	activate
	set myCount to count of spots of current document
	repeat
		set myName to name of spot myCount of current document
		try
			set color type of (spot i of current document whose name is not "[Registration]") to spot color
			set color type of (spot i of current document whose name is not "[Registration]") to process color
		on error
			delete (every swatch of current document whose name is equal to myName)
		end try
		set myCount to myCount - 1
		if myCount is less than 0 then
			exit repeat
		end if
	end repeat
end tell

Thanks,
-Jeff