4 Replies Latest reply on Oct 23, 2013 9:09 AM by AnshulJain19

    [CS4-5.5][JS] Problem convert spot colors to process




      I'm trying to convert all spot color swatches to process, but for some strange reason, some weird behavior occures.


      First I tried this piece of code...


      app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK, model:ColorModel.PROCESS};


      After running the script, the color icon changes, indicating the colorspace/model is changed. But when checking the color in detail, it's still a spot color.




      Just as a test, I tried this piece of code...

      function convertColors2Process(){


           for (var i = 0; i < app.activeDocument.colors.length; i++){


                  var myColor =  app.activeDocument.colors[i];


                  if ((app.activeDocument.colors[i].name != "") && (app.activeDocument.colors[i].name != "Registration")){

                          if (app.activeDocument.colors[i].model != 1886548851){


                                while(myColor.model != ColorModel.PROCESS){

                                          myColor.model = ColorModel.PROCESS;

                                          myColor.space = ColorSpace.CMYK;

                                              myColor.colorValue = [50,20,30,40];






      Now, the color thumbnail changes to the new color, but again, when checking the color. It's still a pantone color with the old values.

      No error occures when running the script and I'm able to change the color manualy in Indesign.


      How do I change the colour mode of all spot colors to CMYK?