Color Code
Crack the hidden sequence of colored pegs using black and white clue pins.
- 1 player
- Puzzle Games
- Classic Games
- Strategy Games
- Checked by Foony staff
- No sign-up
- For parents
Made by Simon Tatham and contributors Published by Foony
Advertisement Remove ads
About Color Code
Color Code is the classic peg-based code-breaking game.
Show more
At the start of each round, the puzzle hides a secret sequence of colored pegs at the top of the board. Your job is to figure out the exact colors and positions within the allotted number of guesses. On each turn, drag colored pegs from the palette on the left into the active row (or click a color and click a slot), then click the small feedback circle area on the right side of that row to lock in your guess.
After you submit a guess, small black and white feedback pins appear beside your row. Each black pin means one of your pegs is the right color in the exact right position. Each white pin means one of your pegs is a right color, but sitting in the wrong position. The pins do not tell you which specific slot matched, so you combine clues across multiple turns to narrow down the hidden code. For example, if you guess Red-Red-Blue-Blue and get one black pin and one white pin, you know two of those pegs are present, with one already locked in its true column.
A reliable opening strategy is to test pairs of colors rather than four different colors on turn one. Starting with an AABB pattern (like Red-Red-Blue-Blue) quickly splits the remaining color pool and tells you whether duplicates appear. If an entire guess returns zero pins, you immediately eliminate every color you just played. On later turns, test one swap at a time while keeping confirmed colors in place so you can tell which peg moved into its correct slot.
This style of code-breaking descends from the 19th-century pencil-and-paper game Bulls and Cows, later popularized worldwide as a tabletop peg board in 1970. Use the Type menu to switch between Standard 4-peg codes, Super 5-peg boards with more colors, or modes that allow blank holes and restrict repeated colors.
How to play
Goal
Deduce the secret row of colored pegs before you run out of guesses, using the black and white feedback pegs after each turn.
Controls
- Drag or click colors
- Place colored pegs from the left palette into the active row
- Click feedback circles
- Submit your completed row and reveal clue pins
- Right-click or drag off
- Remove a peg before submitting your guess
- Type menu
- Switch between Standard, Super, and custom code rules
Steps
- 1 Drag colored pegs from the left column into the top empty guess row.
- 2 Fill every slot in the row with your chosen colors.
- 3 Click the small feedback dots on the right side of the row to check your guess.
- 4 Use the black (exact spot) and white (wrong spot) pins to refine your next row.
- 5 Match every color and position before your guesses run out to win.
Credits and license
- Made by
- Simon Tatham and contributors
- License
- MIT License
- Source code
- www.chiark.greenend.org.uk/~sgtatham/puzzles/
- Credits
-
Made by Simon Tatham and contributors as part of Simon Tatham's Portable Puzzle Collection. License: MIT. Source: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/.
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas Kolker, Dariusz Olszewski, Michael Schierl, Lambros Lambrou, Bernd Schmidt, Steffen Bauer, Lennard Sprong, Rogier Goossens, Michael Quevillon, Asher Gordon, Didi Kohen, and Ben Harris.
Packaged for FreeGames.gg with a responsive desktop and touch wrapper, FreeGamesSdk v1 integration, and external links removed. Full license and change notice are in LICENSE.txt and FREEGAMES-NOTICE.txt.