clean color-variation function