DEV Community

Kim Jin
Kim Jin

Posted on

Can You "Read" Hex Codes? I Built a Game to Test Your Color Intuition ๐ŸŽจ

The Problem: Hex Codes are "Magic Numbers" to Many

As developers, we look at #663399 (Rebecca Purple) or #F0DB4F (JS Yellow) every day. But how many of us can actually visualize the color just by looking at the code? Or even harder: can you guess the exact shade of a "Granny Smith Apple" or "Classic Denim"?

I wanted to bridge the gap between technical color values and our visual intuition, so I built ColorGuesser.app.

๐ŸŽฎ The Game Modes

I designed two distinct ways to challenge your brain:

  1. The Noun Challenge: This is the "fun" part. The game gives you a noun (e.g., "Sunflower" or "Deep Sea"), and you have to find the matching color on the wheel. Itโ€™s surprisingly harder than it looks!
  2. Master the Hex: For the hardcore devs. You get a HEX or RGB value and have to pinpoint it on the spectrum. It's the ultimate training for your "Design Eye."

๐Ÿ› ๏ธ The Tech Stack (Under the Hood)

Since Iโ€™m a fan of modern, lightweight frontend architectures, I avoided heavy frameworks.

  • Web Components & LWC/Lit principles: I wanted near-zero overhead. The UI is snappy and works perfectly on mobile.
  • Perceptual Color Math: To calculate your score, I don't just use simple RGB distance. I use the CIELAB color space and Delta E formulas. Why? Because the human eye perceives differences in green much more acutely than in blue. The scoring system reflects how a human actually sees your error.

๐Ÿš€ Why I Built This

This project started as a way to sharpen my own frontend skills and has grown into a daily ritual for a small community of designers and devs. It currently sees about 40k monthly visitors, and the feedback has been amazing.

๐Ÿ•น๏ธ Try it Out

Iโ€™d love to get the Dev.to communityโ€™s feedback:

  • Whatโ€™s your highest score?
  • Is the "Noun Mode" too subjective? (I use a curated database for these shades!)

Play here: ๐Ÿ‘‰ https://colorguesser.app

Let me know what you think in the comments! If you're a fellow "Indie Hacker," I'd love to chat about how you approach color in your UI/UX.

showdev #javascript #frontend #webdesign

Top comments (0)