I need to check if my actor is touching the RGB value (88,40,16). However I've already tried the lines of code:
GreenfootImage img = getWorld().getBackground();
Color mars = new Color(88, 40, 16);
if(img.getColorAt(getX(),getY()).equals(mars) && yVel>5)
{
}
when I use this code nothing happens and it acts like it is not touching the color. (By the way the color belongs to an actor but I can't use the ifTouching method because the actor has a transparent background and the transparent background takes up the whole screen and then the code would recognize it as touching the actor and it would trigger early.

