Added more tests

This commit is contained in:
2024-03-12 15:23:08 +01:00
parent 6a802c3ad8
commit 0e7bc76a0c
10 changed files with 91 additions and 55 deletions

View File

@ -17,11 +17,16 @@ go get git.akyoto.dev/go/color
## Usage
```go
red := color.RGB(1.0, 0.0, 0.0)
red.Println("red text")
// ANSI
ansi.Red.Println("red text")
orange := color.LCH(0.7, 1.0, 65)
orange.Println("orange text")
// LCH
green := color.LCH(0.5, 1.0, 135)
green.Println("green text")
// RGB
blue := color.RGB(0, 0, 1)
blue.Println("blue text")
```
## Tests
@ -30,9 +35,9 @@ orange.Println("orange text")
PASS: TestPrint
PASS: TestPrintf
PASS: TestPrintln
PASS: TestRGB
PASS: TestLCH
PASS: TestLCHSpectrum
PASS: TestRGB
coverage: 100.0% of statements
```