🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #238

Re: get background color

#238
From: Jon Winters
Date: Sat, 27 Mar 2010 19:43
18 lines
1974 bytes
On Mar 26, 10:17 am, nick <pockl...@gmail.com> wrote:
> can anyone please tell me how to read the background color of a
> textframe or rectangle using javascript

The object's .fillColor property has the details. Assuming you had a
reference to the frame then you need to get the .fillColor of the
reference. Samples are below...

var frameRef = app.selection[0] ;

var fillColorDetails = frameRef.fillColor ;
var fillColorName = frameRef.fillColor.name ;
var fillColorIsCMYK = (frameRef.fillColor.model ==
ColorModel.PROCESS) ;
var fillColorValueArray = frameRef.fillColor.colorValue ;

jon
http://extendscript.blogspot.com/
Technical Details
Message-ID: <0f552869-20bf-42cb-b1c4-2e78fb51fd77@g19g2000yqe.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g19g2000yqe.googlegroups.com!not-for-mail
References: <fcea1632-9fbc-405f-9897-0faad5fdf99d@h4g2000pre.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,3b47decf74365a09
X-Google-NewGroupId: yes
X-Google-Attributes: gida938ebf930,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!g19g2000yqe.googlegroups.com!not-for-mail
From: Jon Winters <electronicpublishingsupport@gmail.com>
Newsgroups: adobe.scripting.indesign
Subject: Re: get background color
Date: Sat, 27 Mar 2010 12:43:56 -0700 (PDT)
Organization: http://groups.google.com
Lines: 18
Message-ID: <0f552869-20bf-42cb-b1c4-2e78fb51fd77@g19g2000yqe.googlegroups.com>
References: <fcea1632-9fbc-405f-9897-0faad5fdf99d@h4g2000pre.googlegroups.com>
NNTP-Posting-Host: 24.127.119.43
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1269719036 10195 127.0.0.1 (27 Mar 2010 19:43:56 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 27 Mar 2010 19:43:56 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g19g2000yqe.googlegroups.com; posting-host=24.127.119.43; 
 posting-account=OfUcXAoAAABXd9xI55c6DAj6aMji0f23
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) 
 AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7,gzip(gfe)