diff --git a/README.md b/README.md index 747086f..31fd6b0 100644 --- a/README.md +++ b/README.md @@ -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/). @@ -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()`. @@ -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