A code-breaking game with coloured pegs and pins
Colour Code in Games by Zaweba is a free code-breaking puzzle: crack a hidden row of coloured pegs in ten tries, guided by black and white pins.

Crack a hidden row of coloured pegs in ten tries: Colour Code in Games by Zaweba is a free code-breaking puzzle built on that classic idea. Little black and white pins after each guess tell you how close you are. It's an original game in the app, it runs offline and it has no adverts.
Code-breaking with pegs is a lovely logic game because it's all about information. Every guess is a question, and the pins are the answer. Asking good questions is the skill.
How Colour Code plays
A code is hidden at the top of the board. Fill a row with coloured pegs and press Check. Each black pin means one peg is the right colour in the right hole. Each white pin means one peg is a right colour but in the wrong hole. The pins don't say which pegs they refer to, so working that out is the puzzle. Crack the code within ten tries to win.
There are two levels. Classic hides 4 pegs chosen from 6 colours, with no repeats. Hard hides 5 pegs from 8 colours, and colours may repeat.
To play, click a colour to fill the ringed hole, or drag it to a hole. Click a peg twice to remove it. On the keyboard, 1 to 8 choose colours, the arrows move, Backspace removes and Enter checks. Colour Code is on the Puzzles shelf.
Asking good questions
Use your first guesses to find colours. In Classic, with 4 pegs from 6 colours and no repeats, an early guess tells you how many of those four colours are in the code. Comparing two guesses that share some colours narrows down which ones are in and which are out.
Change one thing at a time when you're close. If you know the four colours but not their order, swapping two pegs and seeing how the black pins change tells you exactly which positions moved into or out of place.
Never waste a guess. Each new row should be consistent with everything the earlier pins told you. A guess that can't possibly be right gives less information than one that could be.
Keep the counts straight. Black plus white tells you how many of your colours are in the code at all. Black alone tells you how many are in place. Working with those two numbers separately makes the reasoning much clearer.
Be careful on Hard. With repeats allowed and 8 colours, a white pin might belong to a colour you've used twice. Try guesses that use a colour twice on purpose to find out whether it repeats.
Scores, pauses and records
Games by Zaweba keeps your best score for each game and mode, along with plays and wins, so your Classic and Hard records stay separate. The result card at the end shows your score next to your best, and everything is stored in a file on your own PC. Esc pauses whenever you need it, and F1 explains the pins again if you need a reminder.
Other puzzles that reward reasoning
If you like Colour Code, Hidden Mines is the mine-flagging logic grid, where numbers tell you how many mines are nearby. Number Place is the 9 by 9 grid of digits, and Picture Grid reveals a hidden coloured picture from number clues. Switch Off has fifty bulb puzzles where every press flips a bulb and its neighbours. All of them are on the Puzzles shelf of Games by Zaweba.