InDesign Server2025
API 20.5.0.49
Collection of Gradient

Gradients

A collection of gradients.

Properties

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

Methods

Gradient

Returns the Gradient with the specified index.

index Number The index.
Gradient

Creates a new Gradient.

withProperties? Object Initial values for properties of the new Gradient
Gradient

Returns any Gradient in the collection.

Number

Displays the number of elements in the Gradient.

Gradient[]

Returns every Gradient in the collection.

Gradient

Returns the first Gradient in the collection.

Gradient

Returns the Gradient with the specified index or name.

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

Returns the Gradient with the specified ID.

id Number The ID.
Gradient

Returns the Gradient with the specified name.

name String The name.
Gradient[]

Returns the Gradients within the specified range.

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

Returns the last Gradient in the collection.

Gradient

Returns the middle Gradient in the collection.

Gradient

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

obj Gradient The Gradient whose index comes before the desired Gradient.
Gradient

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

obj Gradient The index of the Gradient that follows the desired Gradient.
String

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

Object of 2

Properties elsewhere that hold a Gradients.