var sel=app.activeDocument.selection[0]; var c=app.activeDocument.swatches.getByName("夏").color; sel.fillColor=c; alert(sel.fillColor.hiliteLength);