Add Usage Example (close #4)

This commit is contained in:
6543 2020-09-21 06:48:40 +02:00
parent 62213997bc
commit 929231dcfc
Signed by: 6543
GPG Key ID: A1CA74D27FD13271
1 changed files with 20 additions and 0 deletions

View File

@ -8,3 +8,23 @@

## ToDo
* [ ] Predefine standard colors (red, blue, ... based on CSS colors)

## Usage

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

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

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