identicon

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DarkColors = []color.Color{}/* 124 elements not displayed */

DarkColors are dark colors for avatar blocks, they come from image/color/palette.WebSafe, and light colors (0xff) are removed

Functions

This section is empty.

Types

type Identicon

type Identicon struct {
	// contains filtered or unexported fields
}

Identicon is used to generate pseudo-random avatars

func New

func New(size int, back color.Color, fore ...color.Color) (*Identicon, error)

New returns an Identicon struct with the correct settings size image size back background color fore all possible foreground colors. only one foreground color will be picked randomly for one image

func (*Identicon) Make

func (i *Identicon) Make(data []byte) image.Image

Make generates an avatar by data

Jump to

Keyboard shortcuts

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