-3

I'm trying to get python to recognize a specific pixel color code on screen with 4 options, In case your wondering, I use 1366x768 display resolution, I also use Visual Studio Code

A code/plugin that identify a specific color code pixel

1 Answers1

0

Some code would be helpful in understanding what you are trying to do, but as far as I understand, you want to get the RGB colour of a specific pixel on your screen.

To do this, you can use the pyautogui library.
Install it like this:

pip install pyautogui

Alternatively:

python3 -m pip install pyautogui

Here's an example program:

import pyautogui as auto

x = 200 # replace with X coordinate of the pixel
y = 150 # replace with Y coordinate of the pixel

screenshot = auto.screenshot() # take a 'screenshot'
pixel = screnshot.getpixel(x, y) # get the pixel at position x, y

print(pixel)

If your not quite sure what I mean, check out this stack overflow question to learn more.

Hope this helps!