Skip to content

Instantly share code, notes, and snippets.

@anton-liubushkin
Created February 11, 2016 13:42
Show Gist options
  • Save anton-liubushkin/379139640930615fe6ee to your computer and use it in GitHub Desktop.
Save anton-liubushkin/379139640930615fe6ee to your computer and use it in GitHub Desktop.
Get fill color of shape
function getFillColor() {
var ref = new ActionReference();
ref.putEnumerated(stringIDToTypeID("contentLayer"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
var color = executeActionGet(ref).getList(charIDToTypeID("Adjs")).getObjectValue(0).getObjectValue(charIDToTypeID('Clr '));
return [color.getDouble(charIDToTypeID('Rd ')), color.getDouble(charIDToTypeID('Grn ')), color.getDouble(charIDToTypeID('Bl '))];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment