app.activeDocument.activeChannels.forEach(h => console.log(h.color)); returns
Uncaught Error: The operation is not valid for channels of type component.
at CompositeChannel.get (uxp://uxp-internal:1)
at eval (VM969 Demos.jsx:14)
at Array.forEach (<anonymous>)
at Demos (VM969 Demos.jsx:14)
at renderWithHooks (VM960 react-dom.development.js:14803)
at mountIndeterminateComponent (VM960 react-dom.development.js:17482)
at beginWork (VM960 react-dom.development.js:18596)
at e.exports.callCallback (VM960 react-dom.development.js:188)
at I (uxp://uxp-internal/domjs_scripts.js:2)
What am I missing here?
Is it UXP you are talking about? I don’t see in the docs
activeChannels for document at all How did you find it?
Also, is it just
console.log(h.color)? I see error comes when you try to
eval() something in Demo.jsx
Yes its UXP for photoshop, its there in properties
activeChannels. I don’t understand what you mean by
eval() something ?
name is accessible but not
I keep forgetting how bad docs are
Checked the right side and there’s only saveAs. Didn’t even notice the second Properties item in the menu
Anyway… What if you try to access specific color representation? Eg.
Make sure that you use API version 2 on your manifest file.
Here is info about this.
Also, I found that for basic channels (RGM or CMYK) = “CompositeChannel” this doesn’t work.