Improving color diff algorithm for grayscale