News for hackers. Stuff that matters.
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.