Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import PIL.ImageGrab
- import win32api
- def get_pixel_colour(i_x, i_y):
- return PIL.ImageGrab.grab().load()[i_x, i_y]
- def get_cursor_pos():
- return win32api.GetCursorPos()
- c = get_cursor_pos()
- print get_pixel_colour(c[0], c[1])
Advertisement
Add Comment
Please, Sign In to add comment