Color Code

Play full screen
Rate this game

No ratings yet. Be the first.

How to play

The computer picks a secret row of colored pegs and hides it. You make guesses, and after each one you get a short, coded report on how close you came. Using nothing but those reports, you narrow the possibilities until the code is yours.

Making a guess. Tap colors in the palette to fill your current row from left to right. Tapping a filled slot empties it again, and Clear wipes the whole row. When every slot is filled, press Check. With a keyboard, number keys 1 to 6 (1 to 8 on Hard) pick colors, Backspace removes the last peg and Enter checks the row.

Reading the clue. Beside each checked row you get pins:

  • a black pin for every peg that’s the right color in the right slot;
  • a white pin for every peg that’s the right color but in a different slot.

The pins are a count, not a map. Two black pins tell you two of your pegs are perfect, but not which two.

Winning. Get all black pins before you run out of rows. If you don’t, the secret is revealed. A counter shows how many guesses you have left.

Shapes as well as colors. Each color has its own symbol: red circle, orange triangle, yellow square, green diamond, blue star, purple cross, plus pink heart and teal club on Hard. You can play entirely by shape if colors are hard to tell apart.

The three levels

LevelSlotsColorsRepeats allowedGuessesPossible codes
Easy46no12360
Medium46yes101,296
Hard58yes1032,768

On Easy every peg in the code is a different color, and the palette greys out a color once you’ve used it in your row. Medium is the classic setup: four slots, six colors, duplicates possible. Hard adds a fifth slot and two more colors, which makes the number of possible codes 25 times larger than Medium with the same ten guesses.

Your level choice is remembered for the next game.

How pins are counted with repeats

When colors can repeat, each peg in the secret can earn at most one pin. Black pins are counted first. Then, among the pegs that aren’t already black, white pins go to colors that appear in both your guess and the code, as many times as they overlap.

Example: the code is red-red-blue-green and you guess red-blue-blue-blue. Slot 1 red matches: one black. Slot 3 blue matches: a second black. Of the leftovers, the code still has one red and one green, your guess has two blues. No overlap, so no white pins. The clue is 2 black, 0 white, even though you played three blues.

Strategy

Open wide on Easy. Since repeats aren’t allowed, a first guess of four different colors tests four of the six at once. The total number of pins (black plus white) immediately tells you how many of those four are in the code, and therefore how many of the other two.

Open with pairs on Medium and Hard. A guess like red-red-orange-orange is a common start: it tests two colors and gives clean information about how many of each appear.

Add the pins together. Black + white is how many of your colors belong to the code, regardless of position. Track that number for each color across guesses.

Only guess codes that could be right. Before checking, ask whether your row agrees with every clue so far. A guess that contradicts an earlier clue can’t be the answer and usually wastes a row.

Move one thing when you’re close. With three black pins, swap just two pegs. The change in the pins tells you exactly which slots were right.

Use the spare rows on Medium. It’s known that every Medium code can be cracked in at most five guesses with perfect play, so ten rows leave room to experiment. Hard is far tighter.

Enjoy logic with hidden information? Minesweeper asks you to deduce where the danger is from number clues.

If you enjoy Color Code, try Crate Push or Fence Loop next.

Frequently asked questions

What do the black and white pins mean?

Black: right color in the right slot. White: right color in the wrong slot. They don't say which pegs earned them.

Can colors repeat in Color Code?

On Medium and Hard, yes. On Easy, every color in the code is different.

How many guesses do I get?

Twelve on Easy, ten on Medium and Hard.

Can I play without seeing colors?

Yes. Every color has its own shape, so the whole game works by shape alone.

Does the game save my progress?

Yes. Your guesses are saved as you go and the game picks up where you left off.

Add Color Code to your website

Free, no sign-up. Paste the code into any page. The credit line under the game is optional, but we appreciate it. On WordPress, use our plugin and the shortcode.

Embedding rules and options