Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Illustrator script that will convert all SPOT colors to Process (CMYK)

Explorer ,
Sep 11, 2023 Sep 11, 2023

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

 

TOPICS
Scripting
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Sep 12, 2023 Sep 12, 2023

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 =
...
Translate
Adobe
Explorer ,
Sep 11, 2023 Sep 11, 2023

Also, i want to keep the color names but maybe tag the color _PROCESS  (231_PROCESS)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 11, 2023 Sep 11, 2023

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 12, 2023 Sep 12, 2023

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"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 12, 2023 Sep 12, 2023

Screenshot 2023-09-12 at 8.39.23 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 12, 2023 Sep 12, 2023

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;
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 12, 2023 Sep 12, 2023

that worked great ....except it did not delete the original spot colors

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 12, 2023 Sep 12, 2023

I have no problem removing spot swatches from the document at the end. What version of Illustrator are you using, what operating system?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 12, 2023 Sep 12, 2023
LATEST

tried a new document and it worked flawless....THANK YOU!!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines