Adobe Photoshop CS5 Object Library JS: Channel

Photoshop CS5

Class

Channel

 Object that stores information about a color element in the image, analogous to a plate in the printing process that applies a single color. The document's color mode determines the number of default channels. For example, an RGB document has four default channels: A composite channel: RGB; and three component channels: red, green, and blue. A channel can also be an alpha channel, which stores selections as masks; or a spot channel, which stores spot colors.

QuickLinks

duplicate, duplicate, merge, remove, removeAll

Hierarchy

Object
Channel

Properties

PropertyTypeAccessDescription
colorSolidColor r/wThe color of the channel. Not valid for component channels.
histogram Array of int readonlyA histogram of the color of the channel.
kindChannelType:
ChannelType.COMPONENT
ChannelType.MASKEDAREA
ChannelType.SELECTEDAREA
ChannelType.SPOTCOLOR
r/wThe type of channel.
namestring r/wThe channel name.
opacitynumber r/wThe opacity of alpha channels (called solidity for spot channels). Range: 0 to 100. Valid only when 'type' = masked area or selected area.
parentObject readonlyThe object's container.
typenamestring readonlyThe class name of the object.
visiblebool r/wIf true, the channel is visible.

Methods

Instances

Channel duplicate (relativeObject: Object, insertionLocation: ElementPlacement)
Duplicate this object.

ParameterTypeDescription
relativeObjectObject
insertionLocationElementPlacement:
ElementPlacement.PLACEAFTER
ElementPlacement.PLACEBEFORE
ElementPlacement.PLACEATEND

Channel duplicate ([targetDocument: Document])
Duplicates the channel.

ParameterTypeDescription
targetDocumentDocumentThe document to duplicate the channel to. (Optional)

void merge ()
Merges a spot channel into the component channels.

void remove ()
Deletes this object.

void removeAll ()
Deletes all elements.

Element of

Document.activeChannels

Document.componentChannels

LayerSet.enabledChannels

Used in:

void Document.autoCount (channel: Channel, threshold: int)

void Selection.load (from: Channel[, combination: SelectionType=SelectionType.REPLACE][, inverting: bool=false])

void Selection.store (into: Channel[, combination: SelectionType=SelectionType.REPLACE])

Return

Channel Channel.duplicate (relativeObject: Object, insertionLocation: ElementPlacement)

Channel Channel.duplicate ([targetDocument: Document])

Channel Channels.[] (index: uint)

Channel Channels.add ()

Channel Channels.getByName (name: string)

Jongware, 28-Aug-2012 v3.0.3iContents :: Index