# Super-lightweight SVG identicon (avatar) generator

**URL:** <https://discourse.elm-lang.org/t/super-lightweight-svg-identicon-avatar-generator/8172>\
**Category:** Show and Tell\
**Created:** [February 18, 2022, 9:55am UTC](https://discourse.elm-lang.org/t/super-lightweight-svg-identicon-avatar-generator/8172 "2022-02-18T09:55:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/laurent/32/2051_2.png) [@Laurent](https://discourse.elm-lang.org/u/Laurent)\
**Post date:** [February 18, 2022, 9:55am UTC](https://discourse.elm-lang.org/t/super-lightweight-svg-identicon-avatar-generator/8172/1 "2022-02-18T09:55:16Z")

</div>

I just ported [Minidenticons](https://laurentpayot.github.io/minidenticons/) to Elm: [minidenticons-elm 1.0.1](https://package.elm-lang.org/packages/laurentpayot/minidenticons-elm/latest)

This package allows you to generate SVG identicons (pixelated avatars) on the client from usernames instead of fetching images from a server:

 ![minidenticons](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/2X/7/700e34553dedc1d8f5bc3d350326e9a4103337c8.png)

You can set the saturation and lightness to adapt to your color theme.

It is super lightweight. On my app using the Minidenticons Elm module added only around 250 bytes to the final minified + compressed output (gzip as well as brotli).

The hash function used is exposed as a bonus. Always useful because big integers manipulation in Elm is a bit quirky…

It is my first Elm package, so feel free to tell me what you think 🙂

Cheers,  
Laurent

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [February 28, 2022, 9:55am UTC](https://discourse.elm-lang.org/t/super-lightweight-svg-identicon-avatar-generator/8172/2 "2022-02-28T09:55:31Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
