ColorGradients

A collection of gradients.

Instance Properties

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

Methods

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