Copy link to clipboard
Copied
Hello Everyone,
I want to delete the color swatch namely "PANTONE Black C" in the active document if it available in the color swatches pallete using the Java Script.
Please guide me to figure out this.
hey @Surya24
Try this !
var doc = app.activeDocument;
for (i = 0; i < doc.swatches.length; i++) {
var miColor = doc.swatches[i];
if (miColor.name== "PANTONE Black C") {
miColor.remove();
} else{
continue;
}
}
Copy link to clipboard
Copied
hey @Surya24
Try this !
var doc = app.activeDocument;
for (i = 0; i < doc.swatches.length; i++) {
var miColor = doc.swatches[i];
if (miColor.name== "PANTONE Black C") {
miColor.remove();
} else{
continue;
}
}
Copy link to clipboard
Copied
Thank You so much