Article View: adobe.scripting.indesign
Article #9463Re: [JS, ID 1] fillColor????
From: Dave_Saunders
Date: Mon, 21 Aug 2006 12:21
Date: Mon, 21 Aug 2006 12:21
11 lines
1007 bytes
1007 bytes
First, create the color:
myColor = app.documents[0].colors.add({colorValue:[85,70,40,27],name:"NewCol"});
// then apply it
myTF.fillColor = myColor;
The only odd thing here is that you create a color and you get a new swatch. You can't actually create a new swatch directly.
If you don't name the swatch, it'll be called "Black copy" which is a bit odd -- at least, that's what happened to me using CS2.
Dave
Technical Details
Message-ID:
<3bc1550a.2@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc1550a.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ae72bc081edf6e48 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: [JS, ID 1] fillColor???? Message-ID: <3bc1550a.2@webcrossing.la2eafNXanI> Date: Mon, 21 Aug 2006 05:21:06 -0700 References: <3bc1550a.-1@webcrossing.la2eafNXanI> Lines: 14 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing