Skip to content

normalize hexcolor, use predefined, ...

License

Notifications You must be signed in to change notification settings

6543/go-hexcolor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hex Color Library for Go

Test License: MIT GoDoc Go Report Card

Features:

  • Normalize/Parse hex color
  • convert from/to color.RGBA

ToDo

  • Predefine standard colors (red, blue, ... based on CSS colors)

Usage

Download: go get -u github.com/6543/go-hexcolor

Example:

import (
	"fmt"
	"github.com/6543/go-hexcolor"
)

func main() {
	c, err := hexcolor.NewHexColor("#adf")
	if err != nil {
		panic(err)
	}
	fmt.Println(c.ToString())
}

Contribution

Fork repository, clone it, make changes, push to new branch and submit a pull request.