screen — autopy module for working with the screen

This module contains functions for obtaining attributes about the screen.



Returns a tuple (width, height) of the size of the main screen.

screen.point_visible(x, y)

Returns True if the given point is inside the main screen boundaries.

screen.get_color(x, y)

Returns hexadecimal value describing the RGB color at the given point.

Essentially equivalent to:

rect = ((x, y), (1, 1))
bitmap.capture_screen_portion(rect).get_color(0, 0)

only more efficient/convenient.

  • OSError is thrown if the system calls were unsuccessful.
  • ValueError is thrown if the rect is out of bounds.