Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

get background color

8 views
Skip to first unread message

nick

unread,
Mar 26, 2010, 10:17:04 AM3/26/10
to
can anyone please tell me how to read the background color of a
textframe or rectangle using javascript

thanks in advance

Jon Winters

unread,
Mar 27, 2010, 3:43:56 PM3/27/10
to
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/

0 new messages