Photoshop JS Script that displays RGB values on text layer.
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?
So if I were to change the fill color of a shape object it the script read that RGB value and display it as a on the text layer.
This is what I have so far. It selects the layer, I can change the color but now I need it to also display the RGB values on the separate text layer.
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() }
