modified color function