my dumb way:
usage
if( compareRGBColor(someItem.fillColor,targetColor)){ //do something }
function
function compareRGBColor(c1,c2){ //RGB color comparing utility var result = new Boolean(); if(c1!=undefined && c2!=undefined) { result = (c1.red==c2.red && c1.green == c2.green && c1.blue == c2.blue)?true:false; }else{ //$.writeln("color uncomparable"); } return result }