improving click response in color detection script