Hey Alex,
Keyboard Maestro variables are text-only.
Since you're not using Safari or Google Chrome that method is unfortunately out-of-bounds.
You might find the Case action more straightforward for this task than an IF-THEN action, but your options are limited.
There IS a very tricky way of using images saved in the Finder in Find Image actions:
Find Image on Screen using Clipboard Image?
But you have to be really motivated in order to want to use it.
-Chris