<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: toontoneapp</title>
    <description>The latest articles on DEV Community by toontoneapp (@toontoneapp).</description>
    <link>https://dev.to/toontoneapp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3927330%2F58771b88-4791-4845-bc5b-045e003c27fe.png</url>
      <title>DEV Community: toontoneapp</title>
      <link>https://dev.to/toontoneapp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toontoneapp"/>
    <language>en</language>
    <item>
      <title>I built a color-memory game in vanilla JS — what I learned trying to make "guess the cartoon hue" feel fair</title>
      <dc:creator>toontoneapp</dc:creator>
      <pubDate>Tue, 12 May 2026 13:54:40 +0000</pubDate>
      <link>https://dev.to/toontoneapp/i-built-a-color-memory-game-in-vanilla-js-what-i-4kfp</link>
      <guid>https://dev.to/toontoneapp/i-built-a-color-memory-game-in-vanilla-js-what-i-4kfp</guid>
      <description>&lt;p&gt;Hey — Sam here, solo dev behind Toon Tone (&lt;a href="https://toontone.app" rel="noopener noreferrer"&gt;https://toontone.app&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;# The pitch in one sentence&lt;br&gt;&lt;br&gt;
  You see a cartoon character with one body part whitened out. You drag&lt;br&gt;&lt;br&gt;
  H/S/B sliders until your color matches the one you remember. Five rounds,&lt;br&gt;
  scored 0–10 per round by how close you got.                                                                                                                        &lt;/p&gt;

&lt;p&gt;# Why this exists&lt;br&gt;&lt;br&gt;
  We all "remember" cartoon colors — SpongeBob's yellow, Pikachu's cheeks,&lt;br&gt;&lt;br&gt;
  Mario's red — but the moment you reach for a color picker, you realize&lt;br&gt;
  your memory is off by 30, 40, even 60 RGB units. That gap is the whole&lt;br&gt;&lt;br&gt;
  game.                                                                                                                                                              &lt;/p&gt;

&lt;p&gt;# Three design decisions I want to talk about                                                                                                                      &lt;/p&gt;

&lt;p&gt;## 1. HSB sliders, not RGB&lt;br&gt;&lt;br&gt;
  RGB sliders are a UX trap. Pushing "more red" doesn't feel like pushing&lt;br&gt;
  toward what your brain thinks "more red" is. HSB matches human color&lt;br&gt;&lt;br&gt;
  intuition — hue is "which color," saturation is "how vivid," brightness&lt;br&gt;&lt;br&gt;
  is "how light." Players adjust hue first, then saturation, then&lt;br&gt;&lt;br&gt;
  brightness. That's how memory works too.                                                                                                                           &lt;/p&gt;

&lt;p&gt;## 2. sRGB Euclidean distance for scoring&lt;br&gt;&lt;br&gt;
  I know — it's not perceptually uniform. CIEDE2000 would be technically&lt;br&gt;&lt;br&gt;
  better. But:                                                                                                                                                       &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's brutally fair: every unit of RGB error costs you score, no
hand-waving.
&lt;/li&gt;
&lt;li&gt;It's predictable: players learn the cost model in 2 rounds.
&lt;/li&gt;
&lt;li&gt;It runs in 0.0001ms.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The scoring function is literally 6 lines. I tried perceptual scoring in&lt;br&gt;&lt;br&gt;
  prototype 2; players hated it because "I was so close!" stopped meaning&lt;br&gt;&lt;br&gt;
  anything.                                                                                                                                                          &lt;/p&gt;

&lt;p&gt;## 3. The whitening convention&lt;br&gt;&lt;br&gt;
  For each character, exactly one part is whitened — eyes, shirt, hair, a&lt;br&gt;
  prop. The rest stays in its original color. This is brutal to author&lt;br&gt;&lt;br&gt;
  (every asset is hand-edited), but it teaches the player what "the rest&lt;br&gt;&lt;br&gt;
  of the world looks like" so they can anchor their guess. Without&lt;br&gt;&lt;br&gt;
  context, color memory collapses.                                                                                                                                   &lt;/p&gt;

&lt;p&gt;# Numbers from the first months                                                                                                                                    &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;30+ characters, every Friday I add 1–2 more
&lt;/li&gt;
&lt;li&gt;5 languages live (EN, PT, ES, DE, RU)
&lt;/li&gt;
&lt;li&gt;Average score across all players: ~6.4/10
&lt;/li&gt;
&lt;li&gt;Hardest character so far: SpongeBob (everyone oversaturates the yellow)
&lt;/li&gt;
&lt;li&gt;Easiest: Pikachu (the red cheeks are iconic enough that memory holds)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;# What surprised me&lt;br&gt;&lt;br&gt;
  The single biggest predictor of high scores isn't art training — it's&lt;br&gt;&lt;br&gt;
  whether the player has seen the character recently. Nostalgia memory&lt;br&gt;&lt;br&gt;
  decays differently than recognition memory. I'm now picking new&lt;br&gt;&lt;br&gt;
  characters partly based on "what's about to peak in cultural memory"&lt;br&gt;&lt;br&gt;
  (a Netflix release, a re-run wave).                                                                                                                                &lt;/p&gt;

&lt;p&gt;# Tech stack (for the curious)&lt;br&gt;&lt;br&gt;
  Vanilla JS + Vite, 14kb gzipped, no framework. Supabase for the&lt;br&gt;&lt;br&gt;
  leaderboard. Hosted nginx behind Docker. The whole thing loads in&lt;br&gt;&lt;br&gt;
  ~200ms on 4G.                                                                                                                                                    &lt;/p&gt;

&lt;p&gt;# Come play&lt;br&gt;&lt;br&gt;
  &lt;a href="https://toontone.app" rel="noopener noreferrer"&gt;https://toontone.app&lt;/a&gt; — no signup, no install, takes 3 minutes for a&lt;br&gt;&lt;br&gt;
  full game. Tell me which character is impossible for you.  &lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
