threading done, detecting purple color