News for hackers. Stuff that matters.
Re:Boring Avatars – React library to generate custom avatars by nickjj on Friday May 28, 2021 @08:10AM (#27314411)
They look cool but aren't avatars mainly used to uniquely identify someone based on a picture?

A lot of these look too similar. The really boring approach IMO is to choose a random solid color and put the user's initial(s) on top of it. This makes it pretty unique and much easier to associate someone back to their avatar.

Re:Boring Avatars – React library to generate custom avatars by Mordisquitos on Friday May 28, 2021 @09:25AM (#27315055)
> The really boring approach IMO is to choose a random solid color and put the user's initial(s) on top of it. This makes it pretty unique and much easier to associate someone back to their avatar.

I agree that it's a good simple baseline, but going on a minor off-topic rant, I find it very annoying when this is implemented under the anglocentric assumption of names always being of the format Firstname (Middlename) Surname everywhere, and thus always parsing the initials as "FS". As a result, Spanish people whose naming custom is Firstname(s) 1stSurname 2ndSurname, where the 2nd surname is the "droppable" one, are inappropriately rendered. Director Pedro Almodóvar Caballero becomes "PC", rather than the acceptable versions "PA" or "PAC".

Re:Boring Avatars – React library to generate custom avatars by andrewzah on Friday May 28, 2021 @09:51AM (#27315298)
This is why "first name" should be "given name" and "last name" should be "surname". There are many assumptions programmers make about names, but this one is particularly annoying for CJK and other cultures.

I've had the opposite issue in Korea. Several systems expected LastFirst (from my perspective).

Re:Boring Avatars – React library to generate custom avatars by pindab0ter on Friday May 28, 2021 @02:05PM (#27318606)
This is something I really appreciate about Faker[1], a library that generates random data to seed your development DB with. It will throw you about as many curveballs than obvious 'happy path' names, addresses, phone numbers and whatnot.

[1]: https://fakerphp.github.com/

Re:Boring Avatars – React library to generate custom avatars by nickjj on Friday May 28, 2021 @06:42PM (#27321383)
I love that library, I use it for Python all the time.

In fact, it has a function to generate random hex colors too, and you can even filter it to only generate darker colors so you can create nice looking random avatar circles with a white text color to ensure you get good contrast ratios without having to worry about doing a YIQ based contrast calculation.

Re:Boring Avatars – React library to generate custom avatars by brk on Friday May 28, 2021 @10:18AM (#27315593)
Technically it's "implemented" as a javascript library that you can edit and customize to fit your specific needs and use cases.

Just because the default example is based on one set of assumptions does not mean the project is inherently limited or biased.

Re:Boring Avatars – React library to generate custom avatars by Mordisquitos on Saturday May 29, 2021 @04:21AM (#27323829)
I was talking from the perspective of the end user of a product, not as a developer making use of a library.
Re:Boring Avatars – React library to generate custom avatars by shagie on Friday May 28, 2021 @10:02AM (#27315425)
The sunset pattern are... even less distinctive.

Aside from identicons (which I think work rather well), I believe that a large Mondrian style image with a random circle on it that is then rotated, and scaled to the appropriate size (and cropped if constrained to a rectangle).

This allows for an image that attempts to avoids problem with color vision.

The issue that I had with the Boring Avatars is that too many of them were the same. Switching to ring or sunset had many identical ones. The Bauhaus version had a limited pallet so that the same three colors occurred frequently and only distinctions were in orientations of objects which weren't that distinctive themselves.

The amount of uniqueness per image in this is rather low. The solid color and letter you mentioned has more easy to identify uniqueness.

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.
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
Re:Boring Avatars – React library to generate custom avatars by falcolas on Friday May 28, 2021 @02:18PM (#27318740)
It absolutely is. Thankfully we have 200 billion combinations we don't have to use while still covering every person in the world for the next hundreds years or so.