If with colors



I try to test what vale a color variable has with

if (myColor==Color.green)

and even when I know it is true it doesn't work, any idea how I could
solve this?

Thankfull for every answer

.