Comment

Comment by danneu

Idea: Color each username based on a hash of the username.

    '#' + username.md5().take(6).join('')
I did it for a chat I once built, users liked it, and it helps you keep track of who said what. Though I added some styling to keep it legible, like a 30% white blend, a stroke, and a drop shadow.

https://dl.dropboxusercontent.com/spa/quq37nq1583x0lf/xf17fn... (not the best example since everyone happened to be shades of green)

parent danneu 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton