[ExtendScript] RasterItem.colorize() does not accept SpotColor via script, but does via UI.
MacOS 13.3.1, Adobe Illustrator 27.4.1
The colorize() method of RasterItem doesn't accept a SpotColor via scripting, but can do via the UI, so there is no technical reason I can see why this it the case. It may be a simple bug. Also there is a workaround by using defaultFillColor which does apply a SpotColor to a RasterItem.
Steps to reproduce:
1. Start with document containing a bitmap (colourable) RasterItem and a SpotColor swatch.
2. script: (adjust the swatch index to match your SpotColor swatch index)
app.activeDocument.rasterItems[0].colorize(app.activeDocument.swatches[4].color);
Expected result: colorizes the RasterItem.
Actual result: does nothing.
2
votes
m1b
shared this idea