Skip to main content
csm_phil
Legend
March 31, 2011
Question

How to change SPOT Color to Process CMYK by disabling GLOBAL Option?

  • March 31, 2011
  • 1 reply
  • 5728 views

Hi Scripters,

i have very big problem to change the SPOT COLOR TO PROCESS CYMK  its working and changing fine but since the "GLOBAL" options is enabled, its not converting the spot into exact cmyk process color.

Here is my js code:

var myDoc = app.activeDocument;
for(j=0; j<myDoc.swatches.length; j++){
    if(myDoc.swatches.color=="[SpotColor]" && myDoc.swatches.name!="[Registration]"){
        alert(myDoc.swatches.name);
        myDoc.swatches.color.spot.colorType=ColorModel.PROCESS;
        }
    }

thx,

csm_phil

This topic has been closed for replies.

1 reply

Muppet_Mark-QAl63s
Inspiring
March 31, 2011

Phil, this is off the top of my head… but editing spots in the swatches panel breaks all association with the applied art… They will change but the art will not be mapped to this…

csm_phil
csm_philAuthor
Legend
April 1, 2011

Hi Mark,

Thanx for your reply, however my art does not have any linked images, it just consist of normal rectangular frames with SPOT FIll color.

My requirement is to convert every Spot Colors into CMYK Color in the document swatches.

My above script does this action, but as the "GLOBAL" options cannot be disabled it is retained/changed as Spot CMYK color.

thx,

csm_phil

csm_phil
csm_philAuthor
Legend
April 1, 2011

Phil, Im not taking about colored links to images… I will have to check but Im fairly sure that when you change a swatches type from spot to process it just breaks it. No colored art is changed, pathItems the lot…


Hi Mark,

I have manually checked a swatch by changing the SPOT to Process CMYK and found that its related colored items in the art gets changed automatically to the converted Process CMYK.

As we are not able to do the above action, we have used another logic like create new Process CMYK swatch based on the SPOT Color and then finally delete all the SPOT Colors used in the document

But my requirement is to disable the "GLOBAL" Option while converting SPOT TO Process CMYK in the swatches rather than creating a new color and deleting the SPOT Color.

Below is the JS code for the above mentioned logic:

var myDoc = app.activeDocument;
var spotcnt = myDoc.spots.length;
for(i=0; i<=spotcnt-1; i++){
        var spotname = "";
        var spotvalue = [];
         if(myDoc.spots.name!="[Registration]"){
            spotname = myDoc.spots.name;
            spotvalue = myDoc.spots.getInternalColor();
            mycolor = myDoc.swatches.add();
            mycolor.name = spotname;
            mycolor.color = CMYKColor;
            mycolor.color.cyan = spotvalue[0];
            mycolor.color.magenta = spotvalue[1];
            mycolor.color.yellow = spotvalue[2];
            mycolor.color.black = spotvalue[3];
        }
    }
if (spotcnt > 0){
    app.activeDocument.spots.removeAll();
    }

Please share your comments.

thx,

csm_phil