ColorSwatches

A collection of swatches.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

anyItem(
)
 → Swatch
count(
)
 → number
everyItem(
)
 → Swatch
firstItem(
)
 → Swatch
item(
index)
 → Swatch
itemByID(
id)
 → Swatch
itemByName(
name)
 → Swatch
itemByRange(
from, to)
 → Swatch
lastItem(
)
 → Swatch
middleItem(
)
 → Swatch
nextItem(
obj)
 → Swatch
previousItem(
obj)
 → Swatch
toSource(
)
 → string
anyItem(
)
 → Swatch
Returns any Swatch in the collection.
count(
)
 → number
Displays the number of elements in the Swatch.
everyItem(
)
 → Swatch
Returns every Swatch in the collection.
firstItem(
)
 → Swatch
Returns the first Swatch in the collection.
item(
index)
 → Swatch
Returns the Swatch with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → Swatch
Returns the Swatch with the specified ID.
id number The ID.
itemByName(
name)
 → Swatch
Returns the Swatch with the specified name.
name string The name.
itemByRange(
from, to)
 → Swatch
Returns the Swatches within the specified range.
from The Swatch, index, or name at the beginning of the range. Can accept: Swatch, Long Integer or String.
to The Swatch, index, or name at the end of the range. Can accept: Swatch, Long Integer or String.
lastItem(
)
 → Swatch
Returns the last Swatch in the collection.
middleItem(
)
 → Swatch
Returns the middle Swatch in the collection.
nextItem(
obj)
 → Swatch
Returns the Swatch whose index follows the specified Swatch in the collection.
obj Swatch The Swatch whose index comes before the desired Swatch.
previousItem(
obj)
 → Swatch
Returns the Swatch with the index previous to the specified index.
obj Swatch The index of the Swatch that follows the desired Swatch.
toSource(
)
 → string
Generates a string which, if executed, will return the Swatch.