Is there a way to compare a pathItems swatch color? For example I have a layer named "032 Red" if the pathItem on this layer does NOT have a swatch color named "032 Red" alert the user there is a problem. If everything is ok alert the user that it is all good.
#target illustrator var doc = app.activeDocument; var allLayers = doc.layers; var allLines = doc.pathItems; var allSwatches = doc.swatches; var redSwatch = allSwatches['032 Red'].color; else if (allLines[i].layer == "[Layer 032 Red]"){ if(allLines[i].strokeColor != redSwatch){ alert("Error on layer 032 Red"); } else{ alert("032 Red layer is good"); } }
That is just a snippet of my code but if anyone can help with that I would appreciate it!