Mastermind: Guess the Colors
Guess the hidden color combination in 8 or fewer tries.
Explore Game Details
How to play
A secret combination of 4 colors is selected and you have to guess that combination in 8 or fewer tries to win.
Select a color from the palette, then click a circle in the active row to place it. After filling all circles in a row, click 'Check Guess'.
A green circle (or black peg) means the color and the position is correct. An orange circle (or white peg) means that the color exists in the combination but the position is not correct. An empty circle means that color is not in the combination at all.
Examples
Tips and Strategy
- Start with diverse colors to eliminate options quickly.
- Use the feedback pegs to deduce the exact positions step by step.
- Remember that colors can be repeated in the secret code.
A new secret code is generated for every game.
Frequently Asked Questions
Have another question? Let us know.
What is Mastermind: Guess the Colors?
Mastermind is a classic code-breaking game where a secret combination of 4 colors is hidden and you must deduce it in 8 or fewer attempts. After each guess, feedback pegs tell you how close you are: green for correct color and position, orange for correct color but wrong position.
How do I play Mastermind?
Select a color from the palette at the bottom, then click a circle in the active row to place it. Fill all 4 circles in a row, then click 'Check Guess'. The feedback pegs on the right will show how many colors are correct and in the right position (green) versus correct color but wrong position (orange).
What do the feedback pegs mean?
Green pegs (exact match) mean a color is in the correct position. Orange pegs (color match) mean a color is in the code but in a different position. Empty pegs mean the color is not in the secret code at all. Note that the order of feedback pegs does not correspond to the positions of the colors.
Can colors be repeated in the secret code?
Yes, colors can be repeated. The secret code may contain the same color multiple times (e.g., red-red-blue-green is a valid code). This means you need to carefully track which colors appear once, twice, or not at all.
How many attempts do I have?
You have 8 attempts to guess the secret code. If you run out of attempts, the game reveals the hidden combination. Skilled players can often crack the code in 5-6 guesses using systematic elimination.
Is Mastermind good for your brain?
Yes. Mastermind is one of the best games for developing logical deduction and systematic reasoning. It trains hypothesis testing, pattern elimination, and working memory. It's widely used in education and cognitive training because it teaches structured problem-solving in an engaging way.
Recommended Games
Password Game
Test your password creation ability and logical thinking
Countries of the World Quiz
Can you name all 195 countries? Fill in the world map in 15 minutes, or guess countries by shape and location.
Not a Robot
Prove you're human by solving increasingly difficult CAPTCHA-style challenges.
Explore Game Details
About Mastermind: Guess the Colors
Mastermind: Guess the Colors is a classic code-breaking logic game inspired by the original Mastermind board game invented by Mordecai Meirowitz in 1970. The game generates a secret combination of 4 colors chosen from 6 possibilities, and your task is to crack the code in 8 or fewer attempts. Each guess returns feedback through colored pegs: green (exact match) tells you a color is in the correct position, orange (color match) tells you a color exists in the code but in the wrong position, and empty tells you the color is not in the code at all. Use deduction and elimination to narrow down the possibilities and find the hidden combination.
Playing Mastermind demands logical deduction, pattern recognition, and systematic thinking. It runs on the same process used in scientific reasoning — form hypotheses, test them, and refine your understanding based on feedback. Across rounds you also track which colors have been confirmed or eliminated. It's a timeless brain teaser that rewards careful analysis over guesswork.
