get pixel color from the screen

Hello,
i'm a beginner and i had few questions about programmation.
So i started to learn how to code with arduino language in order to do my projet
i want to do a program that scan a area of my screen ( like from (120,120) to (180,120) ).
and to see if there is a blue pixel on the foreground of my screen, i search like 2 hours and i didn't find a way to do that
At the start i was thinking about getting a color detector and place it in front of my screen , but there is a issue with that , the area that i want to scan is tiny (1pixel width) .
to resum , i want to do something like that :

i want to do a program that scan a area of my screen

The Arduino does not have a screen.

The way to look at this problem is to ask "who put the pixel colour there in the first place?"

hello,
i'm a bigginner and i started to learn how to code in arduino language.
I search during 2 hours how to solve my problem and i didn't found.

So i want to create a program that detect if there is a blue pixel on a specific area of my screen
this area is a 1 pixel width (for instance from (120,120 to 180,120).
i was thinking about getting a color dector but it can't scan this area because the blue pixel is moving on the area.

i found a solution , i need to create a program that scan this area and that tell to the arduino if there is a blue pixel or not .
the program should look like something like this :

if there is a blue(rgb code here) pixel on the rectangle with the coordonate (120,120;180;120)
then tell to aruino to rotate the servo motor (counterclockwise)
if there is a yellow(rgb code here) pixel on the rectangle with the coordonate (120,120;180;120)
then tell to aruino to rotate the servo motor (clockwise)

so here is my questions : is it possible to do a program that run my computer and scan this area each X ms and to tell to arduino what to do

I specify that my arduino can stay connect to my computer with usb cable , it doesn't change something for me because it will stay close

thanks to answere so fast
so it's on a game and i want to create a robot that can fish for me.
So the pixel is on my computer screen and it can be everywhere on tis area of my screen
i can represent it like that :

-------B---
(-=black pixel , and b = blue pixel)

There really was no need to start a new topic.

yes sorry i accidentally created a new post

Which screen and library are you using ?

Can the Arduino and whatever is drawing on the screen access it at the same time ?

i don't use library , and it's just my computer screen.

mabye i wasn't not enough specific.

so i have a game running on my computer as a normal game , there is a rectangle on this game , and i want to create a program that detect if there is a blue pixel on this rectangle then to tell to the arduino to rotate the servo motor

i want to create a program that detect if there is a blue pixel on this rectangle

That program would have to run on the PC, not the Arduino

UKHeliBob:
That program would have to run on the PC, not the Arduino

The program on the PC would interrogate the PC hardware to get the color data, and would write something to the serial port that the Arduino is connected to. The Arduino would read and interpret that data, and move the servo.

Agree with both previous replies, wxWidgets (a c++ library for multiplatform windows & buttons etc) has a specific function that can read any pixel from your screen.

The OPs requirement to read a pixel from a PC screen is directed at the wrong place by posting it here. If the question were about receiving, interpreting and acting upon the data using an Arduino then this would be the place to ask for help, but until that point I feel that there is little point in continuing here.

PaulS:
The program on the PC would interrogate the PC hardware to get the color data, and would write something to the serial port that the Arduino is connected to. The Arduino would read and interpret that data, and move the servo.

It's exactly what i want to do , but i have no idea how to do it ,i only know how to do that with javascript but it's for a website so it doesn't help that much.

If someone can redirect me or help me i would be thanksfull.