I use sikulix and I want to check if a region of a website is red or green.
So I have taken a picture of the part of the website when is red (negatif.png)
A another region for the check of the color. But it doesn't work.
img_negatif = "negatif.png"
profit = Region(1342,212,175,21)
if profit == img_negatif:
click(Location(3406,1420))
else:
click(Location(23,1420))
Everytime sikulix take the else.
You cannot compare regions strictly by color. You can see my answer here (this is from years back but I think it's still relevant).
Sikuli compares the regions with pixel to pixel precision (you can set a similarity level if the images slightly differ but that's not the case). So having selected an area with just color and no other pattern will not work.