Rename Objects with the Fill Color name
Hi, trying to improve the processes, I'm looking for a way to assign names to each object in a layer with the name of the fill color. I have already managed to change the names of the objects, but I want it to be an automatic process: When selecting the objects, it will be renamed according to its fill color.
Using a very simple code for each individual color:
var docRef = activeDocument;
var sel = docRef.selection;
for (var i=0; i < sel.length; i++)
sel.name = "Color20" ;
But I need the name to be taken from the fill color

To each object
