{"id":2595,"library":"mouseinfo","title":"MouseInfo","description":"MouseInfo (version 0.1.3) is a utility application that displays the XY coordinates of the mouse cursor and the RGB color information of the pixel beneath it. Designed for GUI automation planning, it functions across Windows, macOS, and Linux. The project is bundled with `PyAutoGUI` and appears to be in maintenance mode, with its last PyPI update in March 2020.","status":"maintenance","version":"0.1.3","language":"en","source_language":"en","source_url":"https://github.com/asweigart/mouseinfo","tags":["gui","mouse","automation","coordinates","color","utility","tkinter"],"install":[{"cmd":"pip install mouseinfo","lang":"bash","label":"Install using pip"}],"dependencies":[{"reason":"Required for capturing pixel color information.","package":"Pillow","optional":false},{"reason":"Used for clipboard functionality within the application.","package":"pyperclip","optional":true},{"reason":"Required for X11 compatibility on Linux systems.","package":"python-xlib","optional":true}],"imports":[{"note":"Used to launch the MouseInfo GUI application programmatically.","symbol":"MouseInfoWindow","correct":"from mouseinfo import MouseInfoWindow"},{"note":"The module itself can be imported to access its functions, or the application can be run directly via `python -m mouseinfo`.","symbol":"mouseinfo (module)","correct":"import mouseinfo"}],"quickstart":{"code":"import mouseinfo\n\n# To run the MouseInfo GUI application programmatically:\n# This will open a GUI window that displays mouse coordinates and pixel color.\n# The application is blocking until the window is closed.\nmouseinfo.MouseInfoWindow()\n\n# Alternatively, you can run it from the command line:\n# python3 -m mouseinfo","lang":"python","description":"This quickstart demonstrates how to launch the MouseInfo GUI application using Python. The application provides a live display of the mouse cursor's XY coordinates and the RGB color value of the pixel underneath. It will block the Python shell until the GUI window is closed. For a non-blocking experience or direct coordinate/color retrieval in scripts, users typically integrate with `PyAutoGUI`'s `position()` and `pixel()` functions, which `MouseInfo` is often used to plan for."},"warnings":[{"fix":"Use a separate process or thread if you need to run MouseInfo concurrently with other Python code. Alternatively, run it directly from the command line (`python3 -m mouseinfo`) for interactive use without blocking your script.","message":"MouseInfo launches a graphical user interface (GUI) application that is blocking by default. When called from a Python script or interactive shell, the execution will pause until the MouseInfo window is manually closed.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `Pillow` (PIL) is correctly installed (`pip install Pillow`). System-specific workarounds or ensuring correct display permissions might be necessary. Some users report issues persist even with `Pillow` installed.","message":"Users on macOS may encounter issues with `MouseInfo` (and underlying `PyAutoGUI` pixel functions) reporting incorrect RGB values or raising `_tkinter.TclError: invalid color name`. This is often related to `tkinter` or system-specific display configurations.","severity":"gotcha","affected_versions":"All versions on macOS"},{"fix":"Always use MouseInfo with Python 3.x for stability, security, and access to modern Python features.","message":"While MouseInfo states compatibility with Python 2 and 3, Python 2 reached its end-of-life in 2020 and is no longer supported. Running MouseInfo with Python 2 is not recommended due to security vulnerabilities and lack of maintenance in the Python 2 ecosystem.","severity":"gotcha","affected_versions":"All versions used with Python 2.x"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}