How to Play

The Aim of the Game

The aim of the game is simple: Try to guess the color that is being presented on the screen in front of you. The closer your color guess resembles the actual color shown, the lower score you achieve.

The way you guess colors in this game is by typing in the HEX color code of the color you want to guess. If you do not know what HEX is, read the following section on how it works.

Guess the Hex is a game with a purpose. This means that while it is an entertaining game, it does two things. Firstly, you personally learn more about how computers interpret color and gain a much deeper understanding of the constituents of certain color groups. And secondly, for every guess you make (as long as you have a registered account), data is collected and stored about the color that was presented and the accuracy of your guess. This gives three great advantages to this game. As a user, this means you can resume a saved game at any point, and you may view statistics and information about your development in color guessing for each round you play and your overall statistics (view ‘Full Stats’ in-game and ‘Personal Stats’ on the menu page). If you would like to use the data that is collected from all users for analysis, please send me an email and I will grant your request provided the intent is appropriate (this data would be anonymized).

Game Rules

A color similarity algorithm called CIEDE2000 calculates the difference between your guess and the color that is shown, called Delta E. The meanings behind the score that you achieve for a given guess is as follows.

Delta EPerception
≤ 1No perceptible difference
1 – 2Perceptible through close observation
2 – 10Perceptible at a glance
11 – 49Colors more similar than dissimilar
50 – 99Colors more dissimilar than similar
100Exact opposite

Credit to hamada147 (GitHub) for the CIEDE2000 implementation in JavaScript

Each guess changes your lives:

Your guessLives
Exact match+2
Delta E 5 or less+1
Above 5, up to 15No change
Above 15−1
Timer runs out−1

You can hold at most five lives. A timer tracks the amount of time to guess the color presented. If your timer runs out, the timer is reset, and you lose a life. The color presented does not change. The more rounds you pass, the shorter the time available becomes. The amount of time available matches the following curve.

When you run out of lives, the game is lost.

You must submit a six-digit HEX code, or else the input cannot be submitted.

After submitting your color, the sides next to the target image illuminate with the color that you have guessed. The accuracy of your guess will be shown, and a new HEX color will be displayed.

Understanding HEX

A HEX code is a six-digit set of numbers and letters. The way a color is produced from these is simple. A computer generates color by combining a mix of red, green and blue. With these three components, any color on the visible color spectrum can be created. A HEX code just puts together the amount of red, green and blue in each color by chunking each component into pieces of two. The first two symbols represent the red amount, the next two the green amount and the last two the blue amount. Let us look at an example:

#D9FE32
RedGreenBlue
D9FE32
21725450

*The ‘#’ is simply an indicator that this is a HEX code

So this is simple, but how can letters represent a number?

This is because hexadecimal numbers are written in hexadecimal notation, just like binary, or the normal decimal notation. This means that one digit represents a value from zero to 15. Because there are no more than 10 number symbols (0-9), hexadecimal also uses symbols from the alphabet for numbers beyond 9.

  1. 00
  2. 11
  3. 22
  4. 33
  5. 44
  6. 55
  7. 66
  8. 77
  9. 88
  10. 99
  11. A10
  12. B11
  13. C12
  14. D13
  15. E14
  16. F15

As can be seen by the chart, hexadecimal values range from 0 to F, F being 15.

Each individual color component ranges from 00 to FF (255 in decimal) and defines a point on the spectrum of black to maximum of that color component - exactly like RGB (red, green, blue).

ValueRedGreenBlue
FF (max)#FF0000#00FF00#0000FF
E0#E00000#00E000#0000E0
C0#C00000#00C000#0000C0
A0#A00000#00A000#0000A0
80#800000#008000#000080
60#600000#006000#000060
40#400000#004000#000040
20#200000#002000#000020
00#000000#000000#000000

These components can be mixed to produce all humanly visible colors. Read ‘Tips for Success’ to learn about a few key color combinations and their ratios.

Tips for Success

1. Identify the color in front of you as belonging to one of these color groups. They are the same groups your statistics use (how colors are grouped):

GroupRatio (R:G:B)Examples
Red1 : 0 : 0#FF0000#AA1111
Orange / Brown / Yellow1 : ½ : 0 to 1 : 1 : 0#FF8800#FFFF00
Lime / Bright Green2 : 3 : 0#99FF00#55FF55
Green0 : 1 : 0#00AA00#338833
Teal / Cyan0 : 1 : 1#00FFFF#00AAAA
Blue0 : 0 : 1#0000FF#00BBFF
Purple / Violet1 : 0 : 2#8800FF#770077
Pink / Magenta1 : 0 : 1 (bright) or 2 : 0 : 1#FF00FF#FF0088
DarkEvery component low#333333#221144
Light / PaleEvery component high#EEEEEE#FFBBFF
Gray / Faded1 : 1 : 1#888888#779999

*Note that these HEX codes by far do not represent all possible colors and their perfect ratios. This only helps to get started manipulating your hex code to the color that you want. Read the list of subsequent steps to perfect the color.

2. Identify a color as being bright, or less bright, and adjust accordingly

Very bright pink#FF00FF
Darker pink#CC00CC
More velvet#770077

3. Check whether the color presented rather leans more to a certain color component. Colors will almost always have a dominant color.

Grays#999999#BB9999#779999
Turquoise#00FFFF#00FFBB#00BBFF
Yellow#FFFF00#99FF00#FF9900

4. Recognize how saturated the color is: if it is very saturated, there must be a large difference between at least two color components. A large difference would, for example be 00 to DD, for example. If the color becomes less saturated, the third, most far away color component from the rest must approach the other color components.

High saturationLower saturationLow saturation
Blue#0000FF#5555DD#9999BB
Pink#FF00FF#FF77FF#FFBBFF

With all of these tips, you should be set to be able to guess HEX colors! Do not be discouraged if you do not start off all too well, you will improve by practicing, as you get a better feel for how the three color components stand in relation to each other.

And lastly, one small tip: It is already very difficult to correctly identify the 16s place of a color component in this game. Therefore, to help with speed when the time available becomes very short, I advise you to repeat the same number for the 1s place in order to make typing faster (all of the examples used in the past few diagrams show what I mean).

See you on the leaderboard!