Running off of previously answered question
.
Trying to see what I would have to call to adjust values of each stop in a gradient, specifically the fill.tint and opacity values. I would like to apply the following script to the fills.
var docRef = app.activeDocument; var paths = docRef.pathItems; for (i=0; i< paths.length; i++){ if (paths[i].fillColor.tint == 50 && paths[i].opacity == 100){ paths[i].fillColor.tint = 100; paths[i].opacity = 50; } else if (paths[i].fillColor.tint == 100 && paths[i].opacity == 50){ paths[i].fillColor.tint = 50; paths[i].opacity = 100; } }
Here is one of the test files I'm using. In this file looking to make white stops (Fill of 0) have an opacity of 0, and stops of magenta have an opacity equal to their fill.
Any assistance would be much appreciated. Thank you!