fixed incorrect threshold coloring when switching colors