Edit in GitHubLog an issue

Swatches

A collection of swatches.

Instance

Read Only

Number length

The number of objects in the collection.

Methods

Number count()

Displays the number of elements in the Swatch.


Swatch item( Mixed index )

Returns the Swatch with the specified index or name.

Parameters

TypeNameDescription
Mixed
index
The index or name. Can accept: Long Integer or String.

Swatch itemByName( String name )

Returns the Swatch with the specified name.

Parameters

TypeNameDescription
String
name
The name.

Swatch itemByID( Number id )

Returns the Swatch with the specified ID.

Parameters

TypeNameDescription
Number
id
The ID.

Swatch itemByRange( Mixed from, Mixed to )

Returns the Swatches within the specified range.

Parameters

TypeNameDescription
Mixed
from
The Swatch, index, or name at the beginning of the range. Can accept: Swatch, Long Integer or String.
Mixed
to
The Swatch, index, or name at the end of the range. Can accept: Swatch, Long Integer or String.

Swatch firstItem()

Returns the first Swatch in the collection.


Swatch lastItem()

Returns the last Swatch in the collection.


Swatch middleItem()

Returns the middle Swatch in the collection.


Swatch previousItem( Swatch obj )

Returns the Swatch with the index previous to the specified index.

Parameters

TypeNameDescription
Swatch
obj
The index of the Swatch that follows the desired Swatch.

Swatch nextItem( Swatch obj )

Returns the Swatch whose index follows the specified Swatch in the collection.

Parameters

TypeNameDescription
Swatch
obj
The Swatch whose index comes before the desired Swatch.

Swatch anyItem()

Returns any Swatch in the collection.


Swatch everyItem()

Returns every Swatch in the collection.


String toSource()

Generates a string which, if executed, will return the Swatch.


Swatch []( Number index )

Returns the Swatch with the specified index.

Parameters

TypeNameDescription
Number
index
The index.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.