ghicon

GitHubesque identicon generator.


Keywords
identicon, generator, github, pillow, icon, pil, python
License
MIT
Install
pip install ghicon==5.2.2

Documentation

PyPI version

ghicon

ghicon is a GitHubesque identicon generator. It uses seed text and a hashing function, MD5 by default, to create unique icons called identicons.

Usage

Install ghicon using,

pip install ghicon==5.2.2

Then use the generate function,

import ghicon

image = ghicon.generate("agzg")
image.save("agzg.png")

Note: Following v5.2.0, you can use custom hashing functions to generate identicons via the hasher argument. Ensure the function you use only accepts a single string argument, and returns a hexadecimal string hash which is longer than 15 characters.

Tip: You can also invert the colours of the identicon to mix things up! Use the invert argument to do so.

Examples

         

License

Governed under the MIT license.