qidenticon

package
v0.0.0-...-32ad3d8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(str string) uint64

Code derives a code for use with Render.

func Render

func Render(code uint64, totalSize int, settings *Settings) image.Image

Render generates an identicon. code is a code derived by the Code function. totalSize specifies the total size in pixels. It is recommended that this is divisible by 3.

Types

type Settings

type Settings struct {
	// TwoColor specifies if the identicon should be
	// generated using one or two colors.
	TwoColor bool

	// Alpha specifies the transparency of the generated identicon.
	Alpha uint8
}

func DefaultSettings

func DefaultSettings() *Settings

DefaultSettings returns a Settings object with the recommended settings.

Jump to

Keyboard shortcuts

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