A command-line tool that generates unique, visually distinct identicon images from input strings using Elixir's functional programming paradigm.
Built with
- Elixir
- OTP
- EEx (Embedded Elixir)
Key Features
Deterministic Generation
- Same input always produces identical identicon
- MD5 hashing for consistent color and pattern
- Symmetrical 5x5 grid pattern
Functional Design
- Pure functional implementation
- Pattern matching for grid generation
- Pipe operator for clean data flow
Image Output
- PNG image generation
- Customizable grid size
- Color derived from input hash
How It Works
- Hash Input: Convert string to MD5 hash
- Pick Color: Extract RGB values from hash
- Build Grid: Create 5x5 grid from hash bytes
- Mirror Row: Apply horizontal symmetry
- Filter Odds: Determine filled squares
- Generate Image: Render to PNG file
Use Cases
- Default user avatars
- Visual identifiers for hashes
- Unique project/repo icons
- Anonymous user representation
Preview
Repository: github.com/ericgitangu/elixir-create-identicons
Connect
- Portfolio: developer.ericgitangu.com
- GitHub: ericgitangu
- LinkedIn: Eric Gitangu