Color theory..?

    A minimalist color memory game built as a browser extension to test chromatic recall and visual precision.

    A simple idea in color theory

    I've always been intrigued by color theory and how a small set of values can describe a shade with surprising precision. While scrolling through reels, I came across a similar color-memory idea and wondered how simply it could work as a game. It helped me develop spectrum, an extension that asks players to remember colors and recreate them from memory.

    Spectrum extension start screen
    The start screen.

    How the mechanics work

    The gameplay is quite straightforward. Players are presented with five random colors in sequence. Each color flashes on screen for five seconds with a countdown. Once the timer expires, players adjust sliders for hue, saturation, and lightness to recreate the shade they just saw - easily said than done though!

    Memorizing phase with active countdown timer
    Memorizing phase with the running ms countdown.

    Scoring chromatic accuracy

    Scoring is calculated using an algorithm based on HSL color space geometry. Hue is weighted most heavily since our brains perceive angular color shifts drastically, while saturation and lightness are graded using smooth power curves. Scores range from zero to ten per round, leading to a maximum possible score of fifty points, in which you get a message depending on your accuracy. (Out of all the people I know, not many score over 45).

    Squinting
    The squinting is always not on purpose - it always makes me laugh seeing others do.

    Under the hood with Plasmo and React

    It's built using modern web tooling, using React, TypeScript, and Tailwind CSS. Persistence is handled via Chrome storage with automatic session recovery.