Channels
A collections class allowing for array access into a document's channels,
while also providing familiar methods from ExtendScript, like getByName
Copied to your clipboard// Iterate through all channels in the documentapp.activeDocument.channels.forEach(h => console.log(h.name));
Fixes in Photoshop 24.6
- Component channels should work now correctly in non-English localizations
- Channel should be now returned correctly in Bitmap and Indexed Color modes
Indexable
▪ [index: number]: Channel
Used to access the channels in the collection
Copied to your clipboard// Iterate through all channels in the documentapp.activeDocument.channels.forEach(h => console.log(h.name));
Fixes in Photoshop 24.6
- Component channels should work now correctly in non-English localizations
- Channel should be now returned correctly in Bitmap and Indexed Color modes
Properties
| Name | Type | Access | Min Version | Description | 
|---|---|---|---|---|
| length | number | R | 23.0 | Number of Channel elements in this collection. | 
| parent | R | 23.0 | The owner document of this Channel collection. | |
| typename | string | R | 23.0 | The name for this object collection: Channels. | 
Methods
add
23.0Create a new alpha channel in this document.
getByName
23.0Find the first channel with the matching name.
Fixes in Photoshop 24.6
- *Non-English locales return correctly for component channels.
Parameters
| Name | Type | 
|---|---|
| name | string | 
removeAll
23.0void
Remove all Alpha channels in the parent document.
