fixed incorrect color range capping