Color
A color swatch. Base Class: Swatch
Superclass of Tint
QuickLinks
Hierarchy
Properties
Property | Type | Access | Description |
---|---|---|---|
colorValue | Array of number | r/w | The ink values that create the color, specified as a percentage for each ink. Note: The number of values required and the range depends on the color space. For RGB, specify three values, with each value in the range 0 to 255; for CMYK, specify four values representing C, M, Y, and K, with each value in the range 0 to 100; for LAB, specify three values representing L (Range: 0 to 100), A (Range: -128 to 127), and B (Range: -128 to 127); for mixed ink, specify values for each ink in the ink list, with each value in the range 0 to 100. |
eventListeners | EventListeners EventListener | readonly | A collection of event listeners. |
events | Events Event | readonly | A collection of events. |
id | number | readonly | The unique ID of the Color. |
index | number | readonly | The index of the Color within its containing object. |
isValid | bool | readonly | Returns true if the object specifier resolves to valid objects. |
label | string | r/w | A property that can be set to any string. |
model | ColorModel: ColorModel.PROCESS ColorModel.REGISTRATION |
r/w | The color model. |
name | string | r/w | The name of the Color. |
parent | Application Document |
readonly | The parent of the Color (a Application or Document). |
properties | Object | r/w | A property that allows setting of several properties at the same time. |
space | ColorSpace: ColorSpace.RGB ColorSpace.CMYK ColorSpace.LAB ColorSpace.MIXEDINK |
r/w | The color space. |
Methods
Instances
EventListener addEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Adds an event listener.
Parameter | Type | Description |
---|---|---|
eventType | string | The event type. |
handler | File JavaScript Function | The event handler. Can accept: File or JavaScript Function. |
captures | bool | This parameter is obsolete. (Optional) (default: false) |
Color duplicate ()
Duplicates the Color.
string extractLabel (key:
string)
Gets the label value associated with the specified key.
Parameter | Type | Description |
---|---|---|
key | string | The key. |
Array
of Color getElements ()
Resolves the object specifier, creating an array of object references.
void insertLabel (key:
string, value:
string)
Sets the label to the value associated with the specified key.
Parameter | Type | Description |
---|---|---|
key | string | The key. |
value | string | The value. |
Swatch merge (with:
varies)
Merges the specified swatches with the swatch.
Parameter | Type | Description |
---|---|---|
with |
Array
of Swatches String Swatch | The swatches to merge. Can accept: Array of Swatches, Swatch or String. |
void remove ([replacingWith:
Swatch])
Deletes the swatch.
Parameter | Type | Description |
---|---|---|
replacingWith | Swatch | The swatch to apply in place of the deleted swatch. (Optional) |
bool removeEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Removes the event listener.
Parameter | Type | Description |
---|---|---|
eventType | string | The registered event type. |
handler | File JavaScript Function | The registered event handler. Can accept: File or JavaScript Function. |
captures | bool | This parameter is obsolete. (Optional) (default: false) |
string toSource ()
Generates a string which, if executed, will return the Color.
Element of
GradientStop.stopColor
Tint.baseColor
Used in:
Color Colors.nextItem (obj: Color)
Color Colors.previousItem (obj: Color)
Return
Color Application.importAdobeSwatchbookProcessColor (name: string)
Color Application.importAdobeSwatchbookSpotColor (name: string)
Color Color.duplicate ()
Array of Color Color.getElements ()
Color Colors.[] (index: number)
Color Colors.add ([withProperties: Object])
Color Colors.anyItem ()
Array of Color Colors.everyItem ()
Color Colors.firstItem ()
Color Colors.item (index: varies)
Color Colors.itemByID (id: number)
Color Colors.itemByName (name: string)
Array of Color Colors.itemByRange (from: varies, to: varies)
Color Colors.lastItem ()
Color Colors.middleItem ()
Color Colors.nextItem (obj: Color)
Color Colors.previousItem (obj: Color)
Color Document.importAdobeSwatchbookProcessColor (name: string)
Color Document.importAdobeSwatchbookSpotColor (name: string)
Jongware, 29-Apr-2012 v3.0.3i | Contents :: Index |