identicon

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 3 Imported by: 0

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, backColor color.Color, foreColors []color.Color) *Identicon

New returns an Identicon struct. 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