On the Subject of Color Flash

It's easy to identify colors. Red, Blue, Green, etc. Turns out it's a bit harder when you display a word color in a different color though...

  • A color flash module will repeatedly flash a sequence of 8 different words representing colors in different colors.
  • The possible colors are Red, Yellow, Green, Blue, Magenta and White.
  • There is also a Yes button and a No button on the module.
  • Only one of the Yes and No buttons need to be pressed to disarm the module, but must be pressed at the correct time according to the rules below.
  • The color of the last word in the sequence determines which set of rules to follow below.
  • Follow the rules down from the top-most rule, down to the bottom-most rule for the block that applies to your module.
The color of the last word in the sequence is Red:
If Green is used as the word at least three times in the sequence, press Yes on the third time Green is used as either the word or the color of the word in the sequence.
Otherwise, if Blue is used as the color of the word exactly once, press No when the word Magenta is shown.
Otherwise, press Yes the last time White is either the word or the color of the word in the sequence.
The color of the last word in the sequence is Yellow:
If the word Blue is shown in Green color, press Yes on the first time Green is used as the color of the word.
Otherwise, if the word White is shown in either White or Red color, press Yes on the second time in the sequence where the color of the word does not match the word itself.
Otherwise, count the number of times Magenta is used as either the word or the color of the word in the sequence (the word Magenta in Magenta color only counts as one), and press No on the color in the total's position (e.g. a total of 4 means the fourth color in sequence).

Continuation of previous table...

The color of the last word in the sequence is Green:
If a word occurs consecutively with different colors, press No on the fifth entry in the sequence.
If Magenta is used as the word as least three times in the sequence, press No on the first time Yellow is used as either the word or the color of the word in the sequence.
Otherwise, press Yes on any color where the color of the word matches the word itself.
The color of the last word in the sequence is Blue:
If the color of the word does not match the word itself three times or more in the sequence, press Yes on the first time in the sequence where the color of the word does not match the word itself.
If the word Red is shown in Yellow color, or the word Yellow is shown in White color, press No when the word White is shown in Red color.
Otherwise, press Yes the last time Green is either the word or the color of the word in the sequence.
The color of the last word in the sequence is Magenta:
If a color occurs consecutively with different words, press Yes on the third entry in the sequence.
If the number of times the word Yellow appears is greater than the number of times that the color of the word is Blue, press No the last time the word Yellow is in the sequence.
Otherwise, press No on the first time in the sequence where the color of the word matches the word of the seventh entry in the sequence.
The color of the last word in the sequence is White:
If the color of the third word matches the word of the fourth word or fifth word, press No the first time that Blue is used as the word or the color of the word in the sequence.
If the word Yellow is shown in Red color, press Yes on the last time Blue is used as the color of the word.
Otherwise, press No.