Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mazznoer committed Jun 5, 2023
1 parent 8142d69 commit de2d36b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Build Status](/~https://github.com/mazznoer/csscolorparser/workflows/Go/badge.svg)](/~https://github.com/mazznoer/csscolorparser/actions)
[![go report](https://goreportcard.com/badge/github.com/mazznoer/csscolorparser)](https://goreportcard.com/report/github.com/mazznoer/csscolorparser)
[![codecov](https://codecov.io/gh/mazznoer/csscolorparser/branch/master/graph/badge.svg)](https://codecov.io/gh/mazznoer/csscolorparser)
[![Lines of Code](https://tokei.rs/b1/github/mazznoer/csscolorparser?category=code)](/~https://github.com/mazznoer/csscolorparser)

[Go](https://www.golang.org/) library for parsing CSS color string as defined in the W3C's [CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/).

Expand All @@ -19,6 +18,8 @@
* `rgb()` and `rgba()`
* `hsl()` and `hsla()`
* `hwb()`
* `oklab()`
* `oklch()`
* `hwba()`, `hsv()`, `hsva()` - not in CSS standard.

Not yet supported: `lab()`, `lch()`.
Expand Down Expand Up @@ -54,13 +55,11 @@ hsv(120deg 100% 100% / 100%)

```go
import "github.com/mazznoer/csscolorparser"
```

```go
c, err := csscolorparser.Parse("gold")

if err != nil {
panic(err)
panic(err)
}

fmt.Printf("R:%.3f, G:%.3f, B:%.3f, A:%.3f", c.R, c.G, c.B, c.A) // R:1.000, G:0.843, B:0.000, A:1.000
Expand Down

0 comments on commit de2d36b

Please sign in to comment.