Edit in GitHubLog an issue

Colors

A collection of colors.

Instance

Read Only

Number length

The number of objects in the collection.

Methods

Number count()

Displays the number of elements in the Color.


Color add( Object withProperties )

Creates a new Color.

Parameters

TypeNameDescription
Object
withProperties
Initial values for properties of the new Color (Optional)

Color item( Mixed index )

Returns the Color with the specified index or name.

Parameters

TypeNameDescription
Mixed
index
The index or name. Can accept: Long Integer or String.

Color itemByName( String name )

Returns the Color with the specified name.

Parameters

TypeNameDescription
String
name
The name.

Color itemByID( Number id )

Returns the Color with the specified ID.

Parameters

TypeNameDescription
Number
id
The ID.

Color itemByRange( Mixed from, Mixed to )

Returns the Colors within the specified range.

Parameters

TypeNameDescription
Mixed
from
The Color, index, or name at the beginning of the range. Can accept: Color, Long Integer or String.
Mixed
to
The Color, index, or name at the end of the range. Can accept: Color, Long Integer or String.

Color firstItem()

Returns the first Color in the collection.


Color lastItem()

Returns the last Color in the collection.


Color middleItem()

Returns the middle Color in the collection.


Color previousItem( Color obj )

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

Parameters

TypeNameDescription
Color
obj
The index of the Color that follows the desired Color.

Color nextItem( Color obj )

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

Parameters

TypeNameDescription
Color
obj
The Color whose index comes before the desired Color.

Color anyItem()

Returns any Color in the collection.


Color everyItem()

Returns every Color in the collection.


String toSource()

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


Color []( Number index )

Returns the Color with the specified index.

Parameters

TypeNameDescription
Number
index
The index.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.