A grainy gradient made of purple, pink, orange, and red.

HTML Color Name Game

Posted November 21, 2022

Technologies used: CodeSandbox, React

In this game users are prompted to guess the color when given an HTML color name. The most challenging part of this project was developing the scoring system – I decided to base it around the difference between the user’s color and the actual value of the HTML color name using their RGB values.

Calculating the color difference to create a reliable scoring system was much harder than I anticipated. Due to the way the human eyeball works, RGB values don’t always correlate to how we perceive color.

Mathematically the scoring system works, but to the human eye it’s perceptually wrong. Obviously, this has led to many complaints.

Anyways, check it out on codesandbox.