I need to get the color of a pixel in order to compare it with a color from my color.xml file, but all values are negative and this comparison will always return a false res
You could do something like this:
int pixel = Color.RED; //bmp.getPixel(n.x, n.y);
int a = Color.alpha(pixel);
int r = Color.red(pixel);
int g = Color.green(pixel);
int b = Color.blue(pixel);
String color = String.format("#%02X%02X%02X%02X", a, r, g, b); //#FFFF0000 for RED color
but instead of Color.RED
you can put your bmp.getPixel(...)
method.
Hope that helps
Best Regards