Skip to content

Instantly share code, notes, and snippets.

View UltraWelfare's full-sized avatar

George Tsomlektsis UltraWelfare

View GitHub Profile
@UltraWelfare
UltraWelfare / meancolor.py
Last active December 14, 2018 20:02
Grab mean color of screen in python instantly
import mss
from PIL import Image, ImageStat
# From what monitor to take screenshot
monitor_index = 0
def get_color(rescale=(0, 0)):
# Returns a list with the RGBA values.
# Add a rescale tuple parameter (x,y) other than 0,0 to make faster calculations