Added HSL and HSV colors

This commit is contained in:
2025-03-11 14:24:41 +01:00
parent 1b0b4cb28f
commit f75ff8da5a
14 changed files with 153 additions and 48 deletions

View File

@ -7,13 +7,13 @@ import (
)
func BenchmarkRGB(b *testing.B) {
for i := 0; i < b.N; i++ {
for b.Loop() {
color.RGB(1.0, 1.0, 1.0)
}
}
func BenchmarkLCH(b *testing.B) {
for i := 0; i < b.N; i++ {
for b.Loop() {
color.LCH(0.5, 0.5, 0.0)
}
}
@ -22,7 +22,7 @@ func BenchmarkPrint(b *testing.B) {
color.Terminal = true
c := color.RGB(1.0, 1.0, 1.0)
for i := 0; i < b.N; i++ {
for b.Loop() {
c.Print("")
}
}
@ -31,7 +31,7 @@ func BenchmarkPrintRaw(b *testing.B) {
color.Terminal = false
c := color.RGB(1.0, 1.0, 1.0)
for i := 0; i < b.N; i++ {
for b.Loop() {
c.Print("")
}
}