Question
Delete swatches
Hi,
I'm making a script that deletes all the swatches in a document.
That seems very simple using the following line:
> myDoc.swatches.removeAll();
However, for some objects that still use a swatch as fill color, the fill color is replaced by black. I want the object to stay exactly the same...
If I delete all swatches using the interface, it's behaving like I want it to, the swatches are removed, and the color/gradients are preserved.
Any ideas how to replicate this behavior using a script?
I'm using JavaScript, but an AppleScript solution would also be of great help for me.
I'm making a script that deletes all the swatches in a document.
That seems very simple using the following line:
> myDoc.swatches.removeAll();
However, for some objects that still use a swatch as fill color, the fill color is replaced by black. I want the object to stay exactly the same...
If I delete all swatches using the interface, it's behaving like I want it to, the swatches are removed, and the color/gradients are preserved.
Any ideas how to replicate this behavior using a script?
I'm using JavaScript, but an AppleScript solution would also be of great help for me.