Swatch

A swatch (color, gradient, tint, or mixed ink).

Methods:

duplicate, extractLabel, getElements, insertLabel, merge, remove, toSource, toSpecifier

Objects:

Number, Object, String

Hierarchy:

Class: Swatch

Subclasses: MixedInk | MixedInkGroup | Gradient | Color

Property Listing

Property

Type

Access

Description

id

Number

readonly

The unique ID of the Swatch.

index

Number

readonly

The index of the Swatch within its containing object.

label

String

read/write

A property that can be set to any string.

name

String

read/write

The name of the Swatch.

parent

Application

Document

readonly

The parent of the Swatch (a Application or Document).

properties

Object

read/write

A property that allows setting of several properties at the same time.

Method Listing

Swatch duplicate ()

Duplicates the Swatch.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

Object getElements ()

Resolves the object specifier, creating an array of object references.

undefined 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:Array of Varies Swatches Swatch String)

Merges the specified swatches with the swatch.

Parameter

Type

Description

with

Array of Swatches

Swatch

String

The swatches to merge. Can accept: Array of Swatches, Swatch or String.

undefined remove (replacingWith:Swatch)

Deletes the swatch.

Parameter

Type

Description

replacingWith

Swatch

The swatch to apply in place of the deleted swatch. (Optional)

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

Object of

TextDefault.bulletsAndNumberingColor

Text.bulletsAndNumberingColor

Character.bulletsAndNumberingColor

Word.bulletsAndNumberingColor

Line.bulletsAndNumberingColor

TextColumn.bulletsAndNumberingColor

Paragraph.bulletsAndNumberingColor

TextStyleRange.bulletsAndNumberingColor

InsertionPoint.bulletsAndNumberingColor

Story.bulletsAndNumberingColor

ParagraphStyle.bulletsAndNumberingColor

FindPreference.bulletsAndNumberingColor

ChangePreference.bulletsAndNumberingColor

TableStyle.startRowStrokeColor

Table.startRowStrokeColor

TableStyle.bottomBorderStrokeColor

Table.bottomBorderStrokeColor

TableStyle.leftBorderStrokeColor

Table.leftBorderStrokeColor

TableStyle.rightBorderStrokeColor

Table.rightBorderStrokeColor

TableStyle.topBorderStrokeColor

Table.topBorderStrokeColor

Cell.innerColumnStrokeColor

Column.innerColumnStrokeColor

Row.innerColumnStrokeColor

Cell.innerRowStrokeColor

Column.innerRowStrokeColor

Row.innerRowStrokeColor

Cell.rightEdgeStrokeColor

Column.rightEdgeStrokeColor

Row.rightEdgeStrokeColor

CellStyle.rightEdgeStrokeColor

Cell.diagonalLineStrokeColor

Column.diagonalLineStrokeColor

Row.diagonalLineStrokeColor

CellStyle.diagonalLineStrokeColor

TableStyle.startColumnFillColor

Table.startColumnFillColor

TableStyle.endColumnFillColor

Table.endColumnFillColor

TableStyle.startRowFillColor

Table.startRowFillColor

TableStyle.endRowFillColor

Table.endRowFillColor

TableStyle.endRowStrokeGapColor

Table.endRowStrokeGapColor

TableStyle.bottomBorderStrokeGapColor

Table.bottomBorderStrokeGapColor

TableStyle.leftBorderStrokeGapColor

Table.leftBorderStrokeGapColor

TableStyle.rightBorderStrokeGapColor

Table.rightBorderStrokeGapColor

TableStyle.topBorderStrokeGapColor

Table.topBorderStrokeGapColor

TableStyle.startColumnStrokeColor

Table.startColumnStrokeColor

TableStyle.endColumnStrokeColor

Table.endColumnStrokeColor

TableStyle.endRowStrokeColor

Table.endRowStrokeColor

TableStyle.startRowStrokeGapColor

Table.startRowStrokeGapColor

TableStyle.startColumnStrokeGapColor

Table.startColumnStrokeGapColor

TableStyle.endColumnStrokeGapColor

Table.endColumnStrokeGapColor

FormField.shadowColor

Button.shadowColor

PageItem.shadowColor

Oval.shadowColor

Rectangle.shadowColor

GraphicLine.shadowColor

Polygon.shadowColor

Group.shadowColor

Image.shadowColor

EPS.shadowColor

PDF.shadowColor

WMF.shadowColor

PICT.shadowColor

ObjectStyle.shadowColor

TextFrame.shadowColor

Cell.bottomEdgeStrokeColor

Column.bottomEdgeStrokeColor

Row.bottomEdgeStrokeColor

CellStyle.bottomEdgeStrokeColor

Button.fillColor

Character.fillColor

CharacterStyle.fillColor

FormField.fillColor

GraphicLine.fillColor

Group.fillColor

Image.fillColor

InsertionPoint.fillColor

Line.fillColor

ObjectStyle.fillColor

Oval.fillColor

PageItem.fillColor

Paragraph.fillColor

ParagraphStyle.fillColor

Polygon.fillColor

Rectangle.fillColor

Story.fillColor

Text.fillColor

TextColumn.fillColor

TextDefault.fillColor

TextFrame.fillColor

TextStyleRange.fillColor

Word.fillColor

Cell.fillColor

Column.fillColor

Row.fillColor

CellStyle.fillColor

FormField.gapColor

Button.gapColor

PageItem.gapColor

Oval.gapColor

Rectangle.gapColor

GraphicLine.gapColor

Polygon.gapColor

Group.gapColor

ObjectStyle.gapColor

TextFrame.gapColor

Cell.bottomEdgeStrokeGapColor

Column.bottomEdgeStrokeGapColor

Row.bottomEdgeStrokeGapColor

CellStyle.bottomEdgeStrokeGapColor

Cell.diagonalLineStrokeGapColor

Column.diagonalLineStrokeGapColor

Row.diagonalLineStrokeGapColor

CellStyle.diagonalLineStrokeGapColor

Cell.innerColumnStrokeGapColor

Column.innerColumnStrokeGapColor

Row.innerColumnStrokeGapColor

Cell.innerRowStrokeGapColor

Column.innerRowStrokeGapColor

Row.innerRowStrokeGapColor

Cell.leftEdgeStrokeGapColor

Column.leftEdgeStrokeGapColor

Row.leftEdgeStrokeGapColor

CellStyle.leftEdgeStrokeGapColor

Cell.rightEdgeStrokeGapColor

Column.rightEdgeStrokeGapColor

Row.rightEdgeStrokeGapColor

CellStyle.rightEdgeStrokeGapColor

TextDefault.strikeThroughGapColor

Text.strikeThroughGapColor

Character.strikeThroughGapColor

Word.strikeThroughGapColor

Line.strikeThroughGapColor

TextColumn.strikeThroughGapColor

Paragraph.strikeThroughGapColor

TextStyleRange.strikeThroughGapColor

InsertionPoint.strikeThroughGapColor

Story.strikeThroughGapColor

ParagraphStyle.strikeThroughGapColor

FindPreference.strikeThroughGapColor

ChangePreference.strikeThroughGapColor

CharacterStyle.strikeThroughGapColor

Cell.topEdgeStrokeGapColor

Column.topEdgeStrokeGapColor

Row.topEdgeStrokeGapColor

CellStyle.topEdgeStrokeGapColor

TextDefault.underlineGapColor

Text.underlineGapColor

Character.underlineGapColor

Word.underlineGapColor

Line.underlineGapColor

TextColumn.underlineGapColor

Paragraph.underlineGapColor

TextStyleRange.underlineGapColor

InsertionPoint.underlineGapColor

Story.underlineGapColor

ParagraphStyle.underlineGapColor

FindPreference.underlineGapColor

ChangePreference.underlineGapColor

CharacterStyle.underlineGapColor

Cell.leftEdgeStrokeColor

Column.leftEdgeStrokeColor

Row.leftEdgeStrokeColor

CellStyle.leftEdgeStrokeColor

TextDefault.ruleAboveColor

Text.ruleAboveColor

Character.ruleAboveColor

Word.ruleAboveColor

Line.ruleAboveColor

TextColumn.ruleAboveColor

Paragraph.ruleAboveColor

TextStyleRange.ruleAboveColor

InsertionPoint.ruleAboveColor

Story.ruleAboveColor

ParagraphStyle.ruleAboveColor

TextDefault.ruleBelowColor

Text.ruleBelowColor

Character.ruleBelowColor

Word.ruleBelowColor

Line.ruleBelowColor

TextColumn.ruleBelowColor

Paragraph.ruleBelowColor

TextStyleRange.ruleBelowColor

InsertionPoint.ruleBelowColor

Story.ruleBelowColor

ParagraphStyle.ruleBelowColor

FootnoteOption.continuingRuleColor

TextDefault.strikeThroughColor

Text.strikeThroughColor

Character.strikeThroughColor

Word.strikeThroughColor

Line.strikeThroughColor

TextColumn.strikeThroughColor

Paragraph.strikeThroughColor

TextStyleRange.strikeThroughColor

InsertionPoint.strikeThroughColor

Story.strikeThroughColor

ParagraphStyle.strikeThroughColor

FindPreference.strikeThroughColor

ChangePreference.strikeThroughColor

CharacterStyle.strikeThroughColor

TextDefault.ruleAboveGapColor

Text.ruleAboveGapColor

Character.ruleAboveGapColor

Word.ruleAboveGapColor

Line.ruleAboveGapColor

TextColumn.ruleAboveGapColor

Paragraph.ruleAboveGapColor

TextStyleRange.ruleAboveGapColor

InsertionPoint.ruleAboveGapColor

Story.ruleAboveGapColor

ParagraphStyle.ruleAboveGapColor

TextDefault.ruleBelowGapColor

Text.ruleBelowGapColor

Character.ruleBelowGapColor

Word.ruleBelowGapColor

Line.ruleBelowGapColor

TextColumn.ruleBelowGapColor

Paragraph.ruleBelowGapColor

TextStyleRange.ruleBelowGapColor

InsertionPoint.ruleBelowGapColor

Story.ruleBelowGapColor

ParagraphStyle.ruleBelowGapColor

FootnoteOption.continuingRuleGapColor

FootnoteOption.ruleGapColor

Button.strokeColor

Character.strokeColor

CharacterStyle.strokeColor

FormField.strokeColor

GraphicLine.strokeColor

Group.strokeColor

InsertionPoint.strokeColor

Line.strokeColor

ObjectStyle.strokeColor

Oval.strokeColor

PageItem.strokeColor

Paragraph.strokeColor

ParagraphStyle.strokeColor

Polygon.strokeColor

Rectangle.strokeColor

Story.strokeColor

Text.strokeColor

TextColumn.strokeColor

TextDefault.strokeColor

TextFrame.strokeColor

TextStyleRange.strokeColor

Word.strokeColor

FootnoteOption.ruleColor

Cell.topEdgeStrokeColor

Column.topEdgeStrokeColor

Row.topEdgeStrokeColor

CellStyle.topEdgeStrokeColor

TextDefault.underlineColor

Text.underlineColor

Character.underlineColor

Word.underlineColor

Line.underlineColor

TextColumn.underlineColor

Paragraph.underlineColor

TextStyleRange.underlineColor

InsertionPoint.underlineColor

Story.underlineColor

ParagraphStyle.underlineColor

FindPreference.underlineColor

ChangePreference.underlineColor

CharacterStyle.underlineColor

Application.unusedSwatches

Document.unusedSwatches

Return

Swatch.duplicate()

MixedInk.merge()

MixedInkGroup.merge()

Gradient.merge()

Swatch.merge()

Color.merge()

Tint.merge()

Swatches.anyItem()

Swatches.everyItem()

Swatches.nextItem()

Swatches.previousItem()

Swatches.itemByID()

Swatches.item()

Swatches.itemByName()

Swatches.itemByRange()

Swatches.firstItem()

Swatches.lastItem()

Swatches.middleItem()