banny

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 6 Imported by: 0

README

banny

What's banny?

banny is an identicon generator, here is an introduction about what is identicon.

How to use?

Get the project:

go get github.com/go-factory/banny

Generate identicon, you can generate it in your own project directory just like this:

fi, err := os.Create("logo.png")
if err != nil {
  log.Fatal(err)
}
defer fi.Close()

png.Encode(fi, banny.Config.Generate(240))

What else needs to be done?

  • Support email convertion
  • Add color scheme
  • Customize identicon configuration(size, color etc.)

Documentation

Overview

Visit https://github.com/go-factory/banny

Index

Constants

This section is empty.

Variables

View Source
var Config = Banny{
	Rows: 5,
	Foreground: []color.NRGBA{
		rgb(45, 79, 255),
		rgb(141, 69, 170),
		rgb(49, 203, 115),
	},
	Background: rgb(240, 240, 240),
}

Functions

This section is empty.

Types

type Banny

type Banny struct {
	Rows       int
	Foreground []color.NRGBA
	Background color.NRGBA
}

func (*Banny) Generate

func (banny *Banny) Generate(width int) image.Image

Generate generates the identicon, default is .png.

Jump to

Keyboard shortcuts

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