script to get the color name of compound path
Hello, below function don't get the color name if parameter is compound path Item, how can this be achieved?
function getColor(compoundItem) {
var colorName;
if (compoundItem.strokeColor instanceof SpotColor) {
var stColorName = compoundItem.stroke.spot.name;
if(stColorName === "Diecut"){
colorName= "Diecut";
}
}
return colorName;
}