https://github.com/nickrobison/identigo
Identicon Library for Go
https://github.com/nickrobison/identigo
Last synced: about 1 year ago
JSON representation
Identicon Library for Go
- Host: GitHub
- URL: https://github.com/nickrobison/identigo
- Owner: nickrobison
- License: gpl-2.0
- Created: 2013-09-10T01:18:04.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-10T01:30:33.000Z (almost 13 years ago)
- Last Synced: 2024-10-19T05:22:36.130Z (almost 2 years ago)
- Language: Go
- Size: 113 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Identigo
Identigo is a simple Go function for creating two-color identicons from a given Bytestring. It's based on Aaron Lasseigne's Clojure program (https://gist.github.com/AaronLasseigne/6255278) with some modifications.
# Usage
Identigo takes the following inputs:
1. bytestring - ([]Byte) Bytestream of input data
2. tilesPerSide - (Int) of number tile resolution per rectangle side
3. multiplier - (Int) To make a large icon the function multiplies the tilesPerSide with the multiplier and scales the rendering accordingly
4. Background Color - (string) Supported colors are given below
5. Foreground Color - (string) Supported colors are given below
It returns an image object of the size (tilesPerSide * multiplier)
## Supported Colors
black
navy
blue
green
teal
lime
aqua
maroon
purple
olive
gray
silver
red
fuchsia
yellow
white