How Scoring Works
It's more complicated than you might think.
We don't just compare slider values. Both colors are converted into a color space designed to match human vision, then the distance between them is measured using CIEDE2000 โ a formula from color science that quantifies how different two colors look, not how far apart their numbers are. It corrects for known issues where older formulas scored greens, blues, and purples unfairly. That distance is shaped into a game score that rewards getting the right color family โ because remembering "it was a warm orange" is the hardest part, and that should count. Five rounds, 0โ10 per round, max 50.
WHY NOT JUST COMPARE THE SLIDER VALUES?
The game picker uses three sliders: Hue, Saturation, and Brightness (HSB). It's tempting to just subtract the slider numbers and call it a score. But HSB doesn't map to how humans perceive color:
- Hue sensitivity depends on saturation. A 40ยฐ hue shift on a vivid red is dramatic; the same shift on a desaturated grey is barely visible. Raw slider math would penalize both equally.
- Brightness perception is non-linear. The difference between 10% and 20% brightness looks much larger than 80% to 90%, even though both are "10 slider units apart."
- Some hue regions are more sensitive. Humans can distinguish far more shades of green/yellow than blue/purple. A naive formula treats every degree of hue equally.
To fix this, we convert both colors into a perceptually uniform color space and measure the distance there instead.
THE SCORING PIPELINE
1. COLOR SPACE CONVERSION
Both the target color and your guess are converted from HSB through several intermediate spaces:
HSB โ RGB โ XYZ (D65 illuminant) โ CIELAB
CIELAB (also called L*a*b*) is designed so that equal numerical distances correspond to equal perceived differences. The L* axis represents lightness, while a* and b* represent color-opponent dimensions (red-green and yellow-blue).
2. CIEDE2000 DISTANCE
Once both colors are in CIELAB, we compute the CIEDE2000 (ฮEโโ) distance โ the industry standard for "how different do these two colors look?" It accounts for:
- Lightness, chroma, and hue weighting
- Interaction between chroma and hue differences
- Correction for the "blue problem" (hue rotation in the blue region)
- A special term (RT) for compensating cross-term effects near blue
A ฮEโโ of 0 means the colors look identical. A ฮEโโ above 50 means they're completely different colors.
3. S-CURVE MAPPING
The raw ฮEโโ distance is converted to a 0โ10 score using a generalized logistic (S-curve) function:
This creates a generous scoring curve for close matches but punishes large deviations quickly. The midpoint (score โ 5.0) sits at about ฮEโโ = 23, which is a noticeable but not enormous color difference.
Score (0โ10) vs CIEDE2000 perceptual distance. White dot tracks your guess in the demo below.
4. REWARDING COLOR MEMORY
The base score treats all perceptual errors equally. But in a memory game, remembering the right color family is the hardest part and the most satisfying to get right. If you remembered "it was a warm orange" and nailed the hue but were off on brightness, that should count for something. Two adjustments tilt the score toward hue accuracy.
Hue Recovery
If you got the hue right (within about 20ยฐ), you earn back some of the points you lost from saturation or brightness errors:
hueAccuracy = max(0, 1 โ (hueDiff / 25)1.5)satWeight = min(1, avgSat / 30)recovery = (10 โ base) ร hueAccuracy ร satWeight ร 0.25
Recovery is lighter under CIEDE2000 (0.25 factor) because the base formula already handles hue-region differences more accurately. The bonus is still meaningful โ nailing the hue when brightness or saturation are off can recover 1โ2 points. On grays (saturation under 30%), recovery fades to zero โ because hue is visually meaningless on desaturated colors.
Hue Penalty
Conversely, if you nailed the brightness and saturation but remembered the wrong color entirely, you shouldn't keep those points:
huePenFactor = max(0, (hueDiff โ 30) / 150)satWeight = min(1, avgSat / 40)penalty = base ร huePenFactor ร satWeight ร 0.15
There's a 30ยฐ dead zone โ small hue shifts don't trigger any penalty. Beyond that, up to 15% of your base score can be clawed back on vivid colors. On grays (saturation under 40%), penalty also fades to zero.
Final Score
Clamped to [0, 10] and rounded to two decimal places.
See the scoring live
Adjust the sliders and watch the score update in real time. The white dot on the S-curve above tracks your position.
SCORE SCALE
| Score | Emoji | Meaning |
|---|---|---|
| 9.50 โ 10.00 | ๐ฉ | Nearly perfect โ elite-level recall |
| 8.00 โ 9.49 | ๐จ | Excellent memory, minor difference |
| 6.00 โ 7.99 | ๐ง | Good โ noticeable but close |
| 4.00 โ 5.99 | ๐ฅ | Moderate mismatch |
| 2.00 โ 3.99 | ๐ซ | Significant difference |
| 0.00 โ 1.99 | โฌ | Completely different color |