Added HSL and HSV colors
This commit is contained in:
10
LCH_test.go
10
LCH_test.go
@ -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()
|
||||
|
Reference in New Issue
Block a user