mirror of
https://github.com/6543/go-hexcolor
synced 2024-12-18 07:43:41 +00:00
normalize hexcolor, use predefined, ...
|
||
---|---|---|
.github/workflows | ||
.gitignore | ||
doc.go | ||
go.mod | ||
go.sum | ||
hexcolor_test.go | ||
hexcolor.go | ||
LICENSE | ||
Makefile | ||
README.md |
Hex Color Library for Go
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.