I am trying to make an screen color detector so basically you tell it the values of the color of what you  want to find. But the error i run into is IndexError: image index out of range
My Code:
from PIL import ImageGrab
from win32api import GetSystemMetrics
import numpy as np
def Color(R,G,B):
    px = ImageGrab.grab().load()
    
    x = GetSystemMetrics(0)
    y = GetSystemMetrics(1)  
    color = px[x, y]
    if color is R and G and B:
        print("Found The color you want!")
                
        
Color(25, 35, 45) #Telling it the RGB value of what i want to find
is there better way to do this?