title: how to solve argument 2: <class 'TypeError'>: Don't know how to convert parameter 2 error of pyautogui pixel match method?
body: <pre><code>def perfect_click(name, r, g, b):    # Performs a click after checking for loaded image
      location = None
      image_file = name
  
      while location is None:
          try:
              location = pyautogui.locateOnScreen(image_file)
          except Exception as e:
              print(e)
  
      coordinates = pyautogui.center(location)
      x, y = coordinates
      print(coordinates)
      pixel = False
      while pixel is False:
          try:
              pixel = pyautogui.pixelMatchesColor(x, y, (r, g, b), tolerance=10)
          except Exception as e:
              print(e)
      pyautogui.click(coordinates)
  </code></pre>
  
  <p>the above code is supposed to check if the button is clickable and then click it by checking for pixel colour as unclickable buttons are generally a bit dull and pyautogui's locate on screen dosen't work there.
  I't giving me this error, can somebody please help me to resolve this? I really tried everything I could!</p>
  
  <p><code>argument 2: &lt;class 'TypeError'&gt;: Don't know how to convert parameter 2</code></p>