#symbols #icons #hash #random #identicon

bin+lib random-icon

Generates a random icon from a template

6 releases

new 0.1.5 Apr 11, 2025
0.1.4 Mar 27, 2025

#625 in Encoding

Download history 326/week @ 2025-03-22 82/week @ 2025-03-29 68/week @ 2025-04-05

480 downloads per month

MIT license

26KB
572 lines

Generates svg data by filling these areas or leaving them empty.

an image showing the outlines of the areas

Every area has a probability of about 50% of being filled.

The library performs text to image hashing and if the crate feature "rand" is enabled can also generate random symbols.

Examples

Note: Generated icons won't have a white background.

  • "Lorem ipsum dolor sit amet"

    the hashed image

  • "आइकन 🙂 ▒"

    the hashed image

  • ""

    the hashed image of an empty string

  • Example for a random one

    random

Dependencies

~2.5MB
~34K SLoC