Script to make selection 100% Black?
This script question is basic. How would i go about making a script that makes the selection Solid Black? I think i could do this in Indesign but I'm finding that illustrator is not the same in scritping
This script question is basic. How would i go about making a script that makes the selection Solid Black? I think i could do this in Indesign but I'm finding that illustrator is not the same in scritping
It depends on what you have selected. For example you can have raster images, but they won't change color, or what if you had something with a fill and stroke , would you want both to be black?
Assuming you are just dealing with paths which have fills, you can apply the following snippet to give them the "Black" color of your document's swatches. The good thing is, your paths can be grouped or be compound paths, etc.
#target illustrator
function test(){
var doc = app.activeDocument;
doc.defaultFillColor = doc.swatches.getByName("Black").color;
};
test();
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.