normalize hexcolor, use predefined, ...
Go to file
6543 929231dcfc
Add Usage Example (close #4)
2020-09-21 06:48:40 +02:00
.github/workflows Use GitHub Actions (#1) 2020-09-10 23:30:27 +02:00
.gitignore Add badges to README (#2) 2020-09-10 23:53:05 +02:00
LICENSE init go-hexcolor 2020-09-10 16:59:30 +02:00
Makefile add Makefile & update README 2020-09-10 23:13:31 +02:00
README.md Add Usage Example (close #4) 2020-09-21 06:48:40 +02:00
go.mod add test 2020-09-10 17:17:39 +02:00
go.sum Add badges to README (#2) 2020-09-10 23:53:05 +02:00
hexcolor.go rename package 2020-09-10 23:35:53 +02:00
hexcolor_test.go rename package 2020-09-10 23:35:53 +02:00

README.md

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())
}