ColorColorGroupSwatches

A collection of color group swatches.

Instance Properties

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

Methods

add(
swatchItemRef ​[, withProperties])
 → ColorGroupSwatch
count(
)
 → number
item(
index)
 → ColorGroupSwatch
itemByRange(
from, to)
 → ColorGroupSwatch
toSource(
)
 → string
add(
swatchItemRef ​[, withProperties])
 → ColorGroupSwatch
Adds a color group swatch.
swatchItemRef Swatch swatch to be added to color group
withProperties Object Initial values for properties of the new ColorGroupSwatch (Optional)
anyItem(
)
 → ColorGroupSwatch
Returns any ColorGroupSwatch in the collection.
count(
)
 → number
Displays the number of elements in the ColorGroupSwatch.
everyItem(
)
 → ColorGroupSwatch
Returns every ColorGroupSwatch in the collection.
firstItem(
)
 → ColorGroupSwatch
Returns the first ColorGroupSwatch in the collection.
item(
index)
 → ColorGroupSwatch
Returns the ColorGroupSwatch with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → ColorGroupSwatch
Returns the ColorGroupSwatch with the specified ID.
id number The ID.
itemByRange(
from, to)
 → ColorGroupSwatch
Returns the ColorGroupSwatches within the specified range.
from The ColorGroupSwatch, index, or name at the beginning of the range. Can accept: ColorGroupSwatch, Long Integer or String.
to The ColorGroupSwatch, index, or name at the end of the range. Can accept: ColorGroupSwatch, Long Integer or String.
lastItem(
)
 → ColorGroupSwatch
Returns the last ColorGroupSwatch in the collection.
middleItem(
)
 → ColorGroupSwatch
Returns the middle ColorGroupSwatch in the collection.
nextItem(
obj)
 → ColorGroupSwatch
Returns the ColorGroupSwatch whose index follows the specified ColorGroupSwatch in the collection.
obj ColorGroupSwatch The ColorGroupSwatch whose index comes before the desired ColorGroupSwatch.
previousItem(
obj)
 → ColorGroupSwatch
Returns the ColorGroupSwatch with the index previous to the specified index.
obj ColorGroupSwatch The index of the ColorGroupSwatch that follows the desired ColorGroupSwatch.
toSource(
)
 → string
Generates a string which, if executed, will return the ColorGroupSwatch.