Adobe InCopy CS5.5 (7.5) Object Model JS: Colors

InCopy CS5.5

Class

Colors

 A collection of colors.

See also Color.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Color [] (index: number)
Returns the Color with the specified index.

ParameterTypeDescription
indexnumberThe index.

Color add ([withProperties: Object])
Creates a new Color.

ParameterTypeDescription
withPropertiesObjectInitial values for properties of the new Color (Optional)

Color anyItem ()
Returns any Color in the collection.

number count ()
Displays the number of elements in the Color.

Array of Color everyItem ()
Returns every Color in the collection.

Color firstItem ()
Returns the first Color in the collection.

Color item (index: varies)
Returns the Color with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

Color itemByID (id: number)
Returns the Color with the specified ID.

ParameterTypeDescription
idnumberThe ID.

Color itemByName (name: string)
Returns the Color with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Color itemByRange (from: varies, to: varies)
Returns the Colors within the specified range.

ParameterTypeDescription
fromColor
Long Integer
String
The Color, index, or name at the beginning of the range. Can accept: Color, Long Integer or String.
toColor
Long Integer
String
The Color, index, or name at the end of the range. Can accept: Color, Long Integer or String.

Color lastItem ()
Returns the last Color in the collection.

Color middleItem ()
Returns the middle Color in the collection.

Color nextItem (obj: Color)
Returns the Color whose index follows the specified Color in the collection.

ParameterTypeDescription
objColorThe Color whose index comes before the desired Color.

Color previousItem (obj: Color)
Returns the Color with the index previous to the specified index.

ParameterTypeDescription
objColorThe index of the Color that follows the desired Color.

string toSource ()
Generates a string which, if executed, will return the Color.

Element of

Application.colors

Document.colors

Jongware, 29-Apr-2012 v3.0.3iContents :: Index