1 Reply Latest reply on May 7, 2017 1:14 AM by c.pfaffenbichler

    Photoshop JS Script that displays RGB values on text layer.

    damiand40873857

      How would I write a JS that changes the text layer to display the current RGB value of a different layer and updates when that layer color is changed?

       

       

      This is what I have so far.

       

      dlg.color1Btn.onClick = function(){

              app.activeDocument.activeLayer = app.activeDocument.layerSets.getByName("Colors").artLayers.getByName("1");

              app.activeDocument.selection.selectAll();

              getColor();

              app.activeDocument.selection.fill(foregroundColor , undefined, undefined, true);

              app.activeDocument.selection.deselect();

              app.refresh();

              }

       

      function getColor(){  showColorPicker()  }