Specifications

Table Of Contents
Adobe Photoshop CS6
JavaScript Scripting Reference JavaScript Object Reference 72
Channel
Information about a color element in the image.
Access through the Document
.channels collection. You can access an individual channel object in this list
by index or by name. For example, this accesses a channel object in the active document by name and
assigns an
opacity value:
var channelRef = app.activeDocument.channels.getByName("my channel");
channelRef.opacity = 22;
A channel is analogous to a plate in the printing process that applies a single color. The documents color
mode determines the number of default channels; for example, an RGB document has three channels, red,
green, and blue. A color can also have an alpha channel, which stores selections as masks, or a spot
channel, which stores spot colors.
Properties
Methods
Property Value type What it is
color
SolidColor
Read-write. The color of the channel.
Not valid when
kind = ChannelType.COMPONENT.
histogram
array of number
Read-only. A histogram of the color of the channel. The
array contains 256 members.
Not valid when
kind = ChannelType.COMPONENT. For
component channel histogram values, use the histogram
property of the Document
object instead.
kind
ChannelType
Read-write. The type of the channel.
name
string
Read-write. The name of the channel.
opacity
number [0..100]
Read-write. The opacity to use for alpha channels or the
solidity to use for spot channels.
Valid only when
kind = ChannelType.MASKEDAREA or
SELECTEDAREA.
parent
Document
Read-only. The containing document.
typename
string
Read-only. The class name of the referenced channel
object.
visible
boolean
Read-write. True if the channel is visible.
Method Parameter type Returns What it does
duplicate
([targetDocument])
Document
Channel
Duplicates the channel.