How can I get the color of a screen pixel x,y?

It’s not always accurate using one pixel