- Normalize/Parse hex color
- convert from/to color.RGBA
- Predefine standard colors (red, blue, ... based on CSS colors)
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())
}
Fork repository, clone it, make changes, push to new branch and submit a pull request.