Fix color range determination