In the color spelling game, you are shown a list of color names, but rather than reading the words that are written, you have to say the name of the color of the letters. The game is over as soon as you say the wrong color, and the player who spelled the most words correctly wins. To make the game more challeging, each word is written on a different background color.
And here is your challenge:
Write a program that creates a color spelling game.
- Print every second or so the name of a color.
- Use different colors for the background and the foreground.
- The name of the color you print should be different than both the background and the foreground.
- Do not repeat the same color name, foreground or background color in two consecutive rows. It's still ok to reuse the same color in succession for different purposes, like printing the word "red" after a word on a red background.
- Choose each color (pseudo)randomly from a palette of at least 6 colors.
- Use a programming language of your choice.
Here is my solution for JavaScript, change as you like: http://jsfiddle.net/xb8rqsbr/
This is a code golf challenge, so keep your code short.
Have fun!