Sg 2.9
Swatch
Packages RSS
About
News
Gallery
Scripts
Tutorials
Download
Reference
Forum
Users
License
Twitter

A Swatch represents a named color, tint, gradient or pattern contained within an Illustrator document.

They can be retrieved from the document through document.swatches.

Constructors

Creates a new Swatch object.

Sample code:

// create the swatch
var swatch = new Swatch();
swatch.color = new RGBColor(1, 0, 0);
swatch.name = 'Red';
// add it to the document's swatch list
document.swatches.push(swatch);

Operators

    Returns:
  • Boolean

Properties

The name of the swatch.

    Returns:
  • String

The color of the swatch.

The document that the object belongs to. Read-only.

Functions

Removes the swatch from the document's swatch list.

    Returns:
  • Boolean
    Returns:
  • Boolean

AltStyle によって変換されたページ (->オリジナル) /