I'm trying to write a program on linux that does something if the pixels in an area aren't all the same color, for example:
if color not "255, 255, 255":
#do something
this is what i have for one pixel:
import time, pyautogui
time.clock()
image = pyautogui.screenshot()
color = image.getpixel((1006, 553))
print(time.clock())
print(color)
I know how to get the color of a pixel using .getpixel()
but that only gets one pixel
Basically, how do i get the color of an area of pixels when i know all the pixels in that area are the same color.
Also, as quick as possible, like 0.5s or under.