There are several ways... the obvious way is to use a variable that contains the color.. ie Color=1 for red, Color=2 for blue, etc. then simply track the state of the color variable to determine if player variable is the same value...
You could also use frames if all the colors are in one static animation strip and you knew the frames location.. ie red= frame 1, blue = frame 2, etc... then check to see what frame is displaying and match it to a player instance variable of similar values...
I would go variables, much easier...
Make an instance variable in the enemy objects called CurrentColor=0.
Decide what numbers you want to correspond to what colors (red=1, yellow=2, blue=3... RGB#3436... whatever).
In the events that set their initial color set their instance variable to their assigned color (Ie. red cube in above example would be CurrentColor=1).
Anytime the enemy changes color simply change the variable value to match the new color number.
Make an instance variable in Player object for PlayerColor=0 and in initial Player set-up set its value to its color using your color to number plan.
Whenever the Player changes color have those events set its instance variable to match the new color.
Whenever the Player and Enemy collide/Overlap then compare the instance variable of the colliding/overlapping enemy to that of the Player.