This commit is contained in:
parent
9c8f71be07
commit
16881d5e5a
2 changed files with 0 additions and 0 deletions
63
README.md
63
README.md
|
@ -1,63 +0,0 @@
|
|||
# color
|
||||
|
||||
Adds color to your terminal output.
|
||||
|
||||
## Features
|
||||
|
||||
- ANSI colors
|
||||
- HSL colors
|
||||
- HSV colors
|
||||
- LCH colors
|
||||
- RGB colors
|
||||
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
go get git.urbach.dev/go/color
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```go
|
||||
// ANSI
|
||||
ansi.Red.Println("red 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
|
||||
|
||||
```
|
||||
PASS: TestPrint
|
||||
PASS: TestPrintf
|
||||
PASS: TestPrintln
|
||||
PASS: TestHSLSpectrum
|
||||
PASS: TestHSVSpectrum
|
||||
PASS: TestLCH
|
||||
PASS: TestLCHSpectrum
|
||||
PASS: TestRGB
|
||||
coverage: 100.0% of statements
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
```
|
||||
BenchmarkRGB-20 100000000 14.88 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkLCH-20 5075756 227.8 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkPrint-20 1587134 755.5 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkPrintRaw-20 3166090 361.5 ns/op 0 B/op 0 allocs/op
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Please see the [license documentation](https://urbach.dev/license).
|
||||
|
||||
## Copyright
|
||||
|
||||
© 2024 Eduard Urbach
|
Loading…
Add table
Add a link
Reference in a new issue