kyBlockies

package module
v0.0.0-...-7d33923 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: MIT Imports: 6 Imported by: 0

README

kyBlockies

Generate eth address identicons written by golang.

Install
  • go get -u -v github.com/keysonzzz/kyBlockies
Usage
// generate image bytes
kyBlockies.CreateIconBytes(TARGET_ADDRESS)

// generate image and save to path
kyBlockies.CreateIconPng(TARGET_ADDRESS, TARGET_PATH)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIconBytes

func CreateIconBytes(address string) []byte
	Generate Icon Bytes with target address
	@param address: the target eth address needed to create identicon
    @return target image bytes

func CreateIconPng

func CreateIconPng(address string, path string)
Generate Icon png and save to target path
@param path:  full path to save png
@param address: the target eth address needed to create identicon

========================================================================

========================================================================

Types

type HSL

type HSL struct {
	// Hue [0, 360]
	H uint32
	// Saturation [0, 100]
	S uint32
	// Lightness [0, 100]
	L uint32
}

HSL is a color model representation based on RGB. HSL facilitates the generation of colors that look similar between themselves by changing the value of Hue H while keeping Saturation S and Lightness L the same.

func (HSL) RGBA

func (hsl HSL) RGBA() (r, g, b, a uint32)

RGBA conversion

type IconOptions

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

func NewBuildOption

func NewBuildOption(seed string) IconOptions

Jump to

Keyboard shortcuts

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