identigo

package module
v0.0.0-...-aaec537 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2013 License: GPL-2.0 Imports: 7 Imported by: 0

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

Documentation

Overview

Package identigo creates a simple, two-color identicon from a provided byteString

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(bytestring []byte, tilesPerSide int, multiplier int, backcolor string, forecolor string) image.Image

Create function builds the identicon using a standard MD5 hash The following foreground and background colors are supported:

black navy blue green teal lime aqua maroon purple olive gray silver red fuchsia yellow white

If an invalid color is specified, the function defaults to a gray icon with green coloring

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL