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.
Creates a new Swatch object.
// 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
The name of the swatch.
The color of the swatch.
The document that the object belongs to.
Removes the swatch from the document's swatch list.