mirror of
https://github.com/6543/go-hexcolor
synced 2025-04-12 02:47:15 +00:00
Add Usage Example (close #4)
This commit is contained in:
parent
62213997bc
commit
929231dcfc
20
README.md
20
README.md
@ -8,3 +8,23 @@
|
|||||||
|
|
||||||
## ToDo
|
## ToDo
|
||||||
* [ ] Predefine standard colors (red, blue, ... based on CSS colors)
|
* [ ] 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())
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user