Comment

Comment by mcyc

I also found the color scheme to be difficult to understand. A friend suggested interpolating between red and green depending on how close you are to the correct key. This is not too hard, since red is (255, 0, 0) and green is (0, 255, 0), so you can compute a distance (normalized to [0, 1]) and output (255 x d, 255 x (1-d), 0) to get the interpolated color.

It looks quite nice visually.

I wrote a small thread on it: https://twitter.com/good_in_theory/status/175079370720771734...

https://sigmoid.social/@mc/111821291510126156

parent mcyc 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton