🌈 Adds color to your terminal output.
9 Commits
ansi | ||
tty | ||
.gitignore | ||
Benchmarks_test.go | ||
Color_test.go | ||
Color.go | ||
go.mod | ||
go.sum | ||
LCH_test.go | ||
LCH.go | ||
README.md | ||
sRGB.go | ||
Terminal.go |
color
Adds color to your terminal output.
Features
- ANSI colors
- LCH colors
- RGB colors
Installation
go get git.akyoto.dev/go/color
Usage
red := color.RGB(1.0, 0.0, 0.0)
red.Println("red text")
orange := color.LCH(0.7, 1.0, 65)
orange.Println("orange text")
Tests
PASS: TestPrint
PASS: TestPrintf
PASS: TestPrintln
PASS: TestRGB
PASS: TestLCH
PASS: TestLCHSpectrum
coverage: 100.0% of statements
Benchmarks
BenchmarkRGB-12 1000000000 0.3141 ns/op 0 B/op 0 allocs/op
BenchmarkLCH-12 4780176 250.9 ns/op 0 B/op 0 allocs/op
BenchmarkPrint-12 375394 3343 ns/op 0 B/op 0 allocs/op
BenchmarkPrintRaw-12 3105022 387.3 ns/op 0 B/op 0 allocs/op
License
Please see the license documentation.
Copyright
© 2024 Eduard Urbach