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
Type Name Description Mixed index The index or name. Can accept: Long Integer or String.
Swatch itemByName( String name )
Returns the Swatch with the specified name.
Parameters
Type Name Description String name The name.
Swatch itemByID( Number id )
Returns the Swatch with the specified ID.
Parameters
Type Name Description Number id The ID.
Swatch itemByRange( Mixed from, Mixed to )
Returns the Swatches within the specified range.
Parameters
Type Name Description 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
Type Name Description 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
Type Name Description 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
Type Name Description Number index The index.