This commit is contained in:
parent
b8b0fbb57e
commit
afc4092824
14 changed files with 153 additions and 48 deletions
26
HSL_test.go
Normal file
26
HSL_test.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
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()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue