InDesign2026
API 21.5.1.73
Collection of ColorGroup

ColorGroups

A collection of color groups.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

→ ColorGroup

Returns the ColorGroup with the specified index.

index Number The index.
→ ColorGroup

Creates a new ColorGroup

name? String The color group name
swatchList? Swatch[] The swatches to add in color group.
withProperties? Object Initial values for properties of the new ColorGroup
→ ColorGroup

Returns any ColorGroup in the collection.

→ Number

Displays the number of elements in the ColorGroup.

→ ColorGroup[]

Returns every ColorGroup in the collection.

→ ColorGroup

Returns the first ColorGroup in the collection.

→ ColorGroup

Returns the ColorGroup with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
→ ColorGroup

Returns the ColorGroup with the specified ID.

id Number The ID.
→ ColorGroup

Returns the ColorGroup with the specified name.

name String The name.
→ ColorGroup[]

Returns the ColorGroups within the specified range.

from ColorGroup | LongInteger | String The ColorGroup, index, or name at the beginning of the range. Can accept: ColorGroup, Long Integer or String.
to ColorGroup | LongInteger | String The ColorGroup, index, or name at the end of the range. Can accept: ColorGroup, Long Integer or String.
→ ColorGroup

Returns the last ColorGroup in the collection.

→ ColorGroup

Returns the middle ColorGroup in the collection.

→ ColorGroup

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

obj ColorGroup The ColorGroup whose index comes before the desired ColorGroup.
→ ColorGroup

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

obj ColorGroup The index of the ColorGroup that follows the desired ColorGroup.
→ String

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

Object of 2

Properties elsewhere that hold a ColorGroups.