Is there any way to get the color of a pixel at the x and y coordinates of the screen that I specify?
Is there any way to get the color of a pixel at the x and y coordinates of the screen that I specify?
A little vague your question, but try using:
package teste2;
import java.awt.Color;
import java.awt.Robot;
public class teste {
public static void main(String[] args) throws Exception{
Robot robot = new Robot();
Color color = robot.getPixelColor(20, 20);
System.out.println("Red = " + color.getRed());
System.out.println("Green = " + color.getGreen());
System.out.println("Blue = " + color.getBlue());
}
}