segmentation color picking bounds checking