azaghal / pydenticon

Pydenticon is a small utility library that can be used for deterministically generating identicons based on the hash of provided data.
BSD 3-Clause "New" or "Revised" License
66 stars 10 forks source link

Make possible other variants of identicons #7

Open baco opened 8 years ago

baco commented 8 years ago

Nowadays is very common the “bubble” format of user's avatars, for example the contact list on mobile devices. Square shaped avatars tend to look not centered (vertically) and some corners could be cut off.

An interesting approach I've found is using 4 levels of circles starting at different angles, with variable lengths for segments. An example of this is done by the project: https://github.com/bitverseio/identicon#examples . The code implementing this algorithm is in there (but in PHP).

Perhaps Pydenticon could include this feature too having a library for rings.

azaghal commented 8 years ago

Hm... Would be certainly interesting to do that, although I guess I'd need to refactor the library a bit to accommodate for support for different identicon types. Probably should not increase complexity too much with sane defaults.

As a curiosity, do you think that the current implementation would be interesting for such a use-case in case the corners of generated identicon were rounded a bit?