Copy link to clipboard
Copied
I have a bunch of multi colored logos that i need to convert. they will come to me as spot colors
does anybody have a script that will convert all spot colors in an illustrator doc to process...
and after that i willl need to convert all process colors to RGB.
scott
Based on the topic https://community.adobe.com/t5/illustrator-discussions/how-to-change-spot-color-to-process-cmyk-by-disabling-global-option/m-p/3345667 with improvements. You can set the name suffix in the variable. We cannot change the Color Type directly, but we can create a new Process color with values from Spot, and then delete Spot.
//@target illustrator
main();
function main() {
var suffix = '_CMYK';
var isRmvSpot = true; // true of false
var doc = app.activeDocument;
var len =
...
Copy link to clipboard
Copied
Also, i want to keep the color names but maybe tag the color _PROCESS (231_PROCESS)
Copy link to clipboard
Copied
Do you mean process colors with the Global checkbox checked or unchecked? Should the original spot colors remain in the Swatches panel or be deleted? Are the source documents in CMYK mode?
Copy link to clipboard
Copied
in the swatch panel i need the color type to change from Spot Color to Process color. It will have the global color unchecked and that is how it shoud remain.
the name of the color in the swatches panel should change (if possible but not mandatory) to reflect that it is a process color by appending the existing color name with something like "_PROCESS" or "_CMYK"
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Based on the topic https://community.adobe.com/t5/illustrator-discussions/how-to-change-spot-color-to-process-cmyk-by-d... with improvements. You can set the name suffix in the variable. We cannot change the Color Type directly, but we can create a new Process color with values from Spot, and then delete Spot.
//@target illustrator
main();
function main() {
var suffix = '_CMYK';
var isRmvSpot = true; // true of false
var doc = app.activeDocument;
var len = doc.spots.length;
var isRgb = /rgb/i.test(doc.documentColorSpace);
for (var i = 0; i <= len - 1; i++) {
if (doc.spots[i].colorType === ColorModel.REGISTRATION) continue;
var spotName = doc.spots[i].name;
var spotValue = doc.spots[i].getInternalColor();
var sw = doc.swatches.add();
sw.name = spotName + suffix;
var newColor = setColor(spotValue, isRgb);
sw.color = newColor;
}
if (isRmvSpot && len > 0) doc.spots.removeAll();
}
function setColor(arr, isRgb) {
var color = isRgb ? new RGBColor() : new CMYKColor();
if (isRgb) {
color.red = arr[0];
color.green = arr[1];
color.blue = arr[2];
} else {
color.cyan = arr[0];
color.magenta = arr[1];
color.yellow = arr[2];
color.black = arr[3];
}
return color;
}
Copy link to clipboard
Copied
that worked great ....except it did not delete the original spot colors
Copy link to clipboard
Copied
I have no problem removing spot swatches from the document at the end. What version of Illustrator are you using, what operating system?
Copy link to clipboard
Copied
tried a new document and it worked flawless....THANK YOU!!!!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now