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.

Methods:

add, duplicate, remove, removeAll, merge, duplicate

Objects:

Boolean, ChannelType, Number, SolidColor, String

Property Listing

Property

Type

Access

Description

color

SolidColor

read/write

The color of the channel. Not valid for component channels.

histogram

Array of Int

readonly

A histogram of the color of the channel.

kind

ChannelType

ChannelType.COMPONENT

ChannelType.MASKEDAREA

ChannelType.SELECTEDAREA

ChannelType.SPOTCOLOR

read/write

The type of channel.

name

String

read/write

The channel name.

opacity

Number (range 0 - 100)

read/write

The opacity of alpha channels (called solidity for spot channels). Range: 0 to 100. Valid only when 'type' = masked area or selected area.

parent

 

readonly

The object's container.

typename

String

readonly

The class name of the object.

visible

Boolean

read/write

If true, the channel is visible.

Method Listing

Channel add ()

Adds an element.

Channel duplicate (relativeObject:Object, insertionLocation:ElementPlacement)

Duplicate this object.

Parameter

Type

Description

relativeObject

Object

 

insertionLocation

ElementPlacement

ElementPlacement.PLACEAFTER

ElementPlacement.PLACEBEFORE

ElementPlacement.PLACEATEND

 

Channel duplicate ([targetDocument:Document])

Duplicates the channel.

Parameter

Type

Description

targetDocument

Document

The document to duplicate the channel to.

undefined merge ()

Merges a spot channel into the component channels.

undefined remove ()

Deletes this object.

undefined removeAll ()

Deletes all elements.

Object of

LayerSet.enabledChannels

Document.componentChannels

Document.activeChannels

Return

Channels.add()

Channel.add()

Channel.duplicate()

Channel.duplicate()

Channels.[]()

Channels.getByName()