Color change prototype delete please

Would someone be so kind as to add an “if statement” that will delete the onEnterFrame upon arrival at the new color in the following prototype? Thank you

MovieClip.prototype.fadeColor = function(cto, ease) {
var myColor = new Color(this), cColor = myColor.getTransform();
this.onEnterFrame = function() {
for (var c in cColor) {
cColor[c] += (cto[c]-cColor[c])/ease;
}
myColor.setTransform(cColor);
};
};