Refined picking by making the program check for color similarity in
order to allow a cell to be picked. This reduces false positives.
Improved color similarity function