-1
I have a code that returns me the value of a color in hexadecimal in a given coordinate, in the case of the code the coordinates are 200 and 200, the problem is that keep putting these values by the keyboard is a bit laborious, would have some way to add these coordinates via a mouse click ?. type by clicking on the point where I want the coordinates go directly there, to getpixel()? Thank you very much
import pyautogui
pixelColor = pyautogui.screenshot().getpixel((200,200,)) pixelColor = '#%02x%02x%02x' % (pixelColor) print(pixelColor)
Thank you champ but I think I expressed myself badly, I did not want the mouse coordinates, I wanted to pick the coordinates with the mouse click instead of me putting the values through the keyboard. I click on my screen and it captures the coordinates and throws them in my code.
– Maykel