I am trying to detect the color of another object.
public void stopSun (Body other)
{
double fds = other.getExactX();
int dfg = (int) fds;
double zxc = other.getExactY();
int tyu = (int) zxc;
int Color color = getImage().getColorAt(int tyu,int dfg);
if ( color == Color (255, 216, 0))
{
//next step
}
}
Why isn't this working?

