I have an action to click at a found image, which is a button, that can't be clicked like a normal button.
Now when I hover over, the background color of the button changes a little bit, so KM isn't clicking it.
I guess KM is not fast enough to click compared to the effect of the button changing the background color, so it doesn't identify it and stops.
Any idea how to workaround this?
For now I had to have an action to just move to one of the corners of the button to make it change color then another action to find the image with the new background color and click it.
Is there a reason for the second image detection? Can you not just use a "Move and Click, found image's center" mouse action with the first image? If that doesn't work because sometimes the pointer is over the button, changing the colour, try preceding the action with one that moves the pointer to somewhere definitely off the button (like into the menu bar!)
The only way I can see this being a problem is if your mouse might already be over the button, and thus the button is not recognised because it is already highlighted.
The fact that it highlights while Keyboard Maestro clicks it should not affect Keyboard Maestro detecting it, if it has already detected its location.
Very rarely applications require the button to highlight before being clicked, in which case you may want to do as noisneil suggested and move the mouse over the button, then maybe pause, then click at the current location.