Hi, I used UXP to retrieve a layer. Now I have this layer object in Javascript but I don’t know how to retrieve its labelColor.
There is no property here: https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layer/
is there anyway I can get layer label color?
It’s available on BatchPlay via color
property for the target layer
. You can check for the descriptor with Alchemist . Seems it’s not available in DOM yet (@Jarda ? )
Jarda
May 16, 2023, 9:31am
3
Yes, I don’t see it in DOM yet.
Thanks. I was able to retrieve layer label color by using:
const getColorCommand = {
_obj: ‘get’,
_target: {_ref:[{“_property”: “color”}, {_ref: “layer”, _id: layer.id}]}
};
var color = await require(“photoshop”).action.batchPlay([getColorCommand], { modalBehavior: ‘execute’, synchronousExecution: true });