modify color function