Added HSL and HSV colors
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-03-11 14:24:41 +01:00
parent b8b0fbb57e
commit afc4092824
Signed by: eduard
GPG key ID: 49226B848C78F6C8
14 changed files with 153 additions and 48 deletions

View file

@ -25,20 +25,22 @@ func TestLCH(t *testing.T) {
}
for name, c := range lchColors {
testColorRange(t, c)
c.Println("█ " + name)
}
}
func TestLCHSpectrum(t *testing.T) {
color.Terminal = true
color.TrueColor = true
for chroma := range 4 {
for lightness := range 21 {
for hue := range 80 {
c := color.LCH(color.Value(lightness)*0.05, color.Value(chroma)*0.05, color.Value(hue)*4.4)
testColorRange(t, c)
c.Print("█")
l := color.Value(lightness) * 0.05
c := color.Value(chroma) * 0.05
h := color.Value(hue) * 4.4
col := color.LCH(l, c, h)
col.Print("█")
}
fmt.Println()