Drawing a rect when the color is detected