Merging swatches
Hello everyone,
I was wondering if there was a way to merge swatches via script. I only see ways to add or delete.
Thanks!
Hello everyone,
I was wondering if there was a way to merge swatches via script. I only see ways to add or delete.
Thanks!
yea exactly, thanks
Re: Batch replace color with another color
#target illustrator
var docRef = app.activeDocument;
with (docRef) {
var replaceColor = swatches.getByName('PANTONE 101 C').color;
for (var i = 0; i < pathItems.length; i++) {
with (pathItems) {
if (filled == true && fillColor instanceof SpotColor) {
if (fillColor.spot.name == 'PANTONE 133 C') fillColor = replaceColor;
}
if (stroked == true && strokeColor instanceof SpotColor) {
if (strokeColor.spot.name == 'PANTONE 133 C') strokeColor = replaceColor;
}
}
}
for (var j = 0; j < stories.length; j++) {
with (stories
) { for (var k = 0; k < characters.length; k++) {
with (characters
.characterAttributes) { if (fillColor instanceof SpotColor) {
if (fillColor.spot.name == 'PANTONE 133 C') fillColor = replaceColor;
}
if (strokeColor instanceof SpotColor) {
if (strokeColor.spot.name == 'PANTONE 133 C') strokeColor = replaceColor;
}
}
}
}
}
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.