updated colour detection with probability