Answered
how to grab swatches hex colors
I am trying to grab hex colors of the documents swatches. here is what i have
function hexColor() {
var myDoc = app.activeDocument;
var myColors = myDoc.colors;
var swatches = myDoc.swatches;
var array = [];
for (var h = 0; h < swatches.length; h++) {
var mySwatches = swatches[h].name;
array.push(mySwatches);
}
alert(array);
}
I tried to do swatches[h].ColorSpace.hexValue;
that is not working. any ideas out there?
