1 Reply Latest reply on Aug 6, 2014 8:11 AM by Evan M & M

    Is there a way to change the Layer Color Tag via Script?

    Evan M & M

      I tried to use the Script Listener to find the Event to change the Layer Color Tag but there were no commands recorded to my desktop. I have scoured the forums and the depths of Goooooo....ooogle and to no avail.

      I checked the API for an Art Layer and found no options to assign a Color Tag.

       

      I want to change the Color Tag From:

      Capture.JPG

      To Color Tag Purple:

       

      Capture2.JPG

       

      Could anyone please help point me in the Right Direction?

        • 1. Re: Is there a way to change the Layer Color Tag via Script?
          Evan M & M Level 1

          Just solved my own question:

           

          Photoshop was being weird so I had to change the color 2 times for the event to be recognized...idk why but it worked: heres the code:

           

          desc66.putReference( idnull, ref55 );

              var idT = charIDToTypeID( "T   " );

                  var desc67 = new ActionDescriptor();

                  var idClr = charIDToTypeID( "Clr " );

                  var idClr = charIDToTypeID( "Clr " );

                  var idVlt = charIDToTypeID( "Vlt " );

                  desc67.putEnumerated( idClr, idClr, idVlt );

              var idLyr = charIDToTypeID( "Lyr " );

              desc66.putObject( idT, idLyr, desc67 );

          executeAction( idsetd, desc66, DialogModes.NO );