Adobe 26001360 Scripting Guide - Page 83
color info, Notes, Example 5.1
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 83 highlights
Adobe Illustrator CS Scripting Guide 83 Notes This class is used to define a record which contains the color component values of a CMYK color. It is used for specifying and retrieving color information from an Illustrator document or from page items in a document. If the color space of a document is RGB and you specify the color value for a page item in that document using CMYK color info, Illustrator will translate the CMYK color specification into a RGB color specification. The same thing happens if the document's color space is CMYK and you specify colors using RGB color info. Since this translation can cause information loss you should specify colors using the color info class that matches the document's color space. Example 5.1 This example demonstrates how to create a new swatch in a document and assign a CMYK color to the swatch. -- Make a new CYMK color swatch in the current document tell application "Illustrator CS" if not (exists swatch "Our CMYK Swatch" in current document) then set swatchColor to {cyan:50.0, magenta:20.0, yellow:20.0, black:0.0} make new swatch at end of current document with properties ¬ {name:"Our CMYK Swatch", color:swatchColor} end if end tell color info color info is an abstract parent class for all color classes used in Illustrator. Sub classes: • CMYK color info • gradient color info • gray color info • no color info • pattern color info 12 Aug 03