ColorColorGroups

A collection of color groups.

Instance Properties

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

Methods

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