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.
Sample code:
// create the swatch var swatch = new Swatch() { color: new RGBColor(1, 0, 0), name: 'Red' }; // add it to the document's swatch list document.swatches.push(swatch);
The name of the swatch.
The color of the swatch.
Returns the document that this object belongs to.
Read-only.
Removes the swatch from the document's swatch list.
Copyright © 2001-2010 Jürg Lehni, Scratchdisk.com. All Rights Reserved.