From 331597b9f8a7942cbcb233a328301e4d5bf94fb0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 11 Jan 2019 23:28:47 +0200 Subject: Switch to Go modules and make other changes --- .../lucasb-eyer/go-colorful/happy_palettegen.go | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go (limited to 'vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go') diff --git a/vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go b/vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go deleted file mode 100644 index bb66dfa..0000000 --- a/vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go +++ /dev/null @@ -1,25 +0,0 @@ -package colorful - -import ( - "math/rand" -) - -// Uses the HSV color space to generate colors with similar S,V but distributed -// evenly along their Hue. This is fast but not always pretty. -// If you've got time to spare, use Lab (the non-fast below). -func FastHappyPalette(colorsCount int) (colors []Color) { - colors = make([]Color, colorsCount) - - for i := 0; i < colorsCount; i++ { - colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.8+rand.Float64()*0.2, 0.65+rand.Float64()*0.2) - } - return -} - -func HappyPalette(colorsCount int) ([]Color, error) { - pimpy := func(l, a, b float64) bool { - _, c, _ := LabToHcl(l, a, b) - return 0.3 <= c && 0.4 <= l && l <= 0.8 - } - return SoftPaletteEx(colorsCount, SoftPaletteSettings{pimpy, 50, true}) -} -- cgit v1.2.3