fix validation problem

Empty color value and cause validation error then set the
same color value again will not clear the validation error.