NOTE: robot.getcolor(int i, int j)
is simply return robot.getPixelColor(i,j);
void test2(int i, int j)
{
System.out.println(robot.getcolor(i,j));
Color a = robot.getcolor(i,j);
Color b = new Color(91,108,201);
if(a == b)
{
System.out.println("success!");
}
else
{
System.out.println("FAILURE");
}
}
If I do that, then I get this outprint:
java.awt.Color[r=91,g=108,b=201]
FAILURE
What I already tested:
Comparing two colors with == works.
The Alpha parameter shouldn't be a problem, since its 255 and if I add it into the new Color(91,108,201,255) it still prints out FAILURE.