Illustrator javascript find color of RasterItem
I am able to set a RasterItem's color with colorize(), but I would also like to find a way to get it's current color from a script. One hack I found is to select the item and then look at the selected swatch, but sometimes there is no swatch that matches the item's color.
My script performs a threshold function ( assigning black or white to every fill and stroke ) as a prepress operation when I don't want my RIP to halftone anything that is almost black or almost white.
RasterItem.colorants just gives me the string "Gray"
PS: I found a possible workaround. If you select the RasterItem then create a new filled PathItem it seems to be filled wth the RasterItem's fill color, so you can grab the color then delete the pathItem.
