Skip to content

A Go package that effortlessly generates captivating geometric pattern avatars based on email hashes.

License

Notifications You must be signed in to change notification settings

nawafinity/geometric-avatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geometric-avatar

geometric-avatar is a Go package that effortlessly generates captivating geometric pattern avatars based on email hashes.


GitHub Sponsors donate button GitHub Sponsors donate button

Changelog | العربية

Features

  • Simplicity & Ease: Straightforward and effortless to use.
  • 🎨 Customizable: Tailor avatars to your preference with a range of customization options.
  • 🆙 Golang v1.27 Compatibility: Developed and optimized for Golang version 1.27.

Installation

To integrate the package, utilize go get:

go get github.com/nawafinity/geometric-avatar

Usage

Below is an illustrative example of how to utilize the package in your code.

package main

import (
	"fmt"
	"github.com/nawafinity/geometric-avatar"
	"image/color"
)

func main() {
	email := "geometric-avatar"
	options := map[string]interface{}{
		"size":       128.0,
		"margin":     0.08,
		"background": color.RGBA{238, 238, 238, 255},
	}

	avatar := geometric_avatar.GenerateAvatar(email, options)
	dc := avatar.Render()

	// Save the avatar as a PNG file
	err := dc.SavePNG("output.png")
	if err != nil {
		fmt.Println("Error:", err)
	}
}

Sponsor

Become a Sponsor

Bugs and Feature Requests

Discovered a bug or have a feature request? Please open a new issue

License

MIT License

About

A Go package that effortlessly generates captivating geometric pattern avatars based on email hashes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages