I figured it would be a nice to have. Currently Tested only on Mac.
@asweigart let me know if you want me to make any adjustments to this branch.
import pyautogui
((currentMouseX, currentMouseY), (red, green, blue, alpha)) = pyautogui.cposition()
# Get the current XY position of the mouse with the color RGBA.
((currentMouseX, currentMouseY), (red, green, blue, alpha)) = pyautogui.cposition(1314, 345)
# Or Get a specific XY position of the mouse with the color RGBA.
currentMouseX, currentMouseY
# 1314, 345
red, green, blue, alpha
# 45, 163, 52, 255 # osx
# 45, 163, 52, None # win
Returns position with RGB & Alpha as two tuples.
I figured it would be a nice to have. Currently Tested only on Mac.
@asweigart let me know if you want me to make any adjustments to this branch.