Re:Boring Avatars – React library to generate custom avatars
by awb on Friday May 28, 2021 @09:47AM
(#27315256)
There are only 676 unique 2 letter pairs or 17.5k 3 letter letter initial triplets, and initials aren’t evenly distributed so there’s a ton of non-uniqueness in that approach for a platform with millions of users.
[ Parent
| on HN ]
Re:Boring Avatars – React library to generate custom avatars
by nickjj on Friday May 28, 2021 @11:47AM
(#27316831)
> there’s a ton of non-uniqueness in that approach for a platform with millions of users
Sure but context is everything.
Chances are millions of users aren't all posting in the same thread / post / chat room / etc. at once. There might only be a few dozen or even hundreds of them, and the odds of hitting 2 people with the same name + similar color are really low then. Plus on top of that, some users will have custom avatars they've uploaded to make the sample size even less for running into a collision.
Google also happens to use the random color + first initial pattern too and they have over a billion users. It works, even in a busy Google Doc.
Re:Boring Avatars – React library to generate custom avatars
by falcolas on Friday May 28, 2021 @12:45PM
(#27317613)
Plus 16.7 million RGB colors, making for quite a few combinations (somewhere around 230 billion).
Re:Boring Avatars – React library to generate custom avatars
by dequor on Friday May 28, 2021 @02:13PM
(#27318688)
True,but it's a bit hard to distinguish between #ffffff and #fffffe