color/HSL_test.go
Eduard Urbach afc4092824
All checks were successful
/ test (push) Successful in 15s
Added HSL and HSV colors
2025-03-11 14:24:41 +01:00

26 lines
382 B
Go

package color_test
import (
"fmt"
"testing"
"git.urbach.dev/go/color"
)
func TestHSLSpectrum(t *testing.T) {
color.Terminal = true
color.TrueColor = true
for lightness := range 21 {
for hue := range 80 {
h := color.Value(hue) * 4.4
s := color.Value(1.0)
l := color.Value(lightness) * 0.05
c := color.HSL(h, s, l)
c.Print("█")
}
fmt.Println()
}
}