is it blue or black?

Each of us perceives colour differently. Our eyes, our brains, even the lighting around us — all influence what we actually see.

I built a game to answer the question –
how small a difference you can actually detect?

Skip the explanation and jump to the game

ΔE

ΔE is a score for “how far apart” two colours are:
ΔE = 0 → identical colors.
ΔE < 2 → is usually imperceptible to the human eye.
ΔE < 10+ → obvious, clearly distinct colors.
The lower the number you can detect, the sharper your colour vision.

The Math

To calculate ΔE, colors are plotted into a three-dimensional map, called Lab color space.
L* → brightness (light to dark)
a* → green to red axis
b* → blue to yellow axis

Once in this space, the difference between two colors is just Euclidean distance — the same formula used to measure the distance between two points in geometry

\Delta E = \sqrt{(L_1 - L_2)^2 + (a_1 - a_2)^2 + (b_1 - b_2)^2}

The Code

The Code uses the latest colour distance formula CIEDE2000 that adjust the math to match perception better.

References
https://en.wikipedia.org/wiki/Color_difference
https://hajim.rochester.edu/ece/sites/gsharma/papers/CIEDE2000CRNAFeb05.pdf

Notes
I didn’t write a single line of code. It’s all created using AI tools
Everything is in one html file, you can download it and play locally
Your GPU and Displays may affect your score

Update: The game is not on GitHub: https://github.com/gsama/deltaE-game.git

2 responses to “is it blue or black?”

  1. Ishaan Singh Avatar
    Ishaan Singh

    I admire how you’re always upto something new, something different, something intelligent

  2. Jui Sabnis Avatar
    Jui Sabnis

    It’s inspiring to see you exploring new ideas and sharing them with others. Looking forward to reading more.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.