Code Breaker Game: Color Logic Puzzle

This code breaker game hides a secret code of colored pegs, and you get a set number of tries to crack it. After each guess, clues show how many colors are right and how many are in the right spot. Use logic to narrow it down and break the code. Need to play classic paddle Pong against the computer? Try the Pong Game.

Code Breaker

Crack the secret color code with logic.

Everything runs in your browser. Nothing you type is sent to a server.

How to use the Code Breaker

  1. Pick a color, then click a hole in the current row, or just click colors in order.
  2. Fill all holes and press Check.
  3. ● black = right color in the right place. ○ white = right color in the wrong place.
  4. Use the clues to make your next guess.
  5. Crack the code within 10 guesses to win.

Features

  • 4 or 5 pegs, 6 colors
  • Optional duplicate colors
  • Classic black and white peg feedback
  • Win rate, streak and average guesses saved
  • Colorblind-friendly symbols on every color

Frequently asked questions

What is the best first guess?

With four pegs and six colors, a guess with two pairs like red, red, blue, blue gives a lot of information when duplicates are on.

Do the clue pegs show which position is right?

No. The clues are sorted, so you only know how many are right, not which ones.

Can it always be solved?

Yes. Any four-peg, six-color code can be solved in five guesses with perfect play.

What does duplicates mean?

When on, the secret code can use the same color more than once.

See also: Word Guess, Memory Game, Sudoku Online, Minesweeper Online.

How to play code breaker

How to use it

  1. Pick colors for each slot to make a guess.
  2. Submit the guess and read the clue pegs.
  3. Use the clues to rule out colors and spots.
  4. Crack the code before you run out of turns.

More questions

What do the clue pegs mean?

One type means a right color in the right spot. The other means a right color in the wrong spot.

Is this like Mastermind?

Yes. It follows the same classic color code guessing idea.

What is a good first guess?

Many players start with two pairs of colors to learn the most from the first clue.

Related tools: Lights Out Puzzle, Word Guess, Memory Game.