49 lines
884 B
Markdown
Raw Normal View History

2024-03-05 17:47:02 +01:00
# color
Adds color to your terminal output.
## Features
2024-03-06 00:18:51 +01:00
- RGB color space
- OKLCH color space
- Truecolor terminal output
2024-03-05 17:47:02 +01:00
## Installation
```shell
go get git.akyoto.dev/go/color
```
## Usage
```go
red := color.RGB(1.0, 0.0, 0.0)
2024-03-05 19:10:27 +01:00
red.Println("red text")
2024-03-05 17:47:02 +01:00
```
## Tests
```
2024-03-06 00:18:51 +01:00
PASS: TestNoColors
PASS: TestColors
PASS: TestRainbow
2024-03-05 17:47:02 +01:00
coverage: 100.0% of statements
```
## Benchmarks
```
2024-03-06 00:18:51 +01:00
BenchmarkRGB-12 1000000000 0.3132 ns/op 0 B/op 0 allocs/op
BenchmarkLCH-12 11214220 107.1 ns/op 0 B/op 0 allocs/op
BenchmarkFprintColorized-12 6356535 188.4 ns/op 0 B/op 0 allocs/op
BenchmarkFprintRaw-12 27374659 43.76 ns/op 0 B/op 0 allocs/op
2024-03-05 17:47:02 +01:00
```
## License
Please see the [license documentation](https://akyoto.dev/license).
## Copyright
© 2024 Eduard Urbach