fixed NaN from hue2rgb