aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/lucasb-eyer/go-colorful/colorgens.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-01-11 23:28:47 +0200
committerTulir Asokan <tulir@maunium.net>2019-01-11 23:28:47 +0200
commit331597b9f8a7942cbcb233a328301e4d5bf94fb0 (patch)
tree5ec624585ebf66c63549a098acb6f7421f1193a7 /vendor/github.com/lucasb-eyer/go-colorful/colorgens.go
parent2fc3378b717f40f37f3a188b68407887242d9c06 (diff)
Switch to Go modules and make other changes
Diffstat (limited to 'vendor/github.com/lucasb-eyer/go-colorful/colorgens.go')
-rw-r--r--vendor/github.com/lucasb-eyer/go-colorful/colorgens.go55
1 files changed, 0 insertions, 55 deletions
diff --git a/vendor/github.com/lucasb-eyer/go-colorful/colorgens.go b/vendor/github.com/lucasb-eyer/go-colorful/colorgens.go
deleted file mode 100644
index 2e2e49e..0000000
--- a/vendor/github.com/lucasb-eyer/go-colorful/colorgens.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Various ways to generate single random colors
-
-package colorful
-
-import (
- "math/rand"
-)
-
-// Creates a random dark, "warm" color through a restricted HSV space.
-func FastWarmColor() Color {
- return Hsv(
- rand.Float64()*360.0,
- 0.5+rand.Float64()*0.3,
- 0.3+rand.Float64()*0.3)
-}
-
-// Creates a random dark, "warm" color through restricted HCL space.
-// This is slower than FastWarmColor but will likely give you colors which have
-// the same "warmness" if you run it many times.
-func WarmColor() (c Color) {
- for c = randomWarm(); !c.IsValid(); c = randomWarm() {
- }
- return
-}
-
-func randomWarm() Color {
- return Hcl(
- rand.Float64()*360.0,
- 0.1+rand.Float64()*0.3,
- 0.2+rand.Float64()*0.3)
-}
-
-// Creates a random bright, "pimpy" color through a restricted HSV space.
-func FastHappyColor() Color {
- return Hsv(
- rand.Float64()*360.0,
- 0.7+rand.Float64()*0.3,
- 0.6+rand.Float64()*0.3)
-}
-
-// Creates a random bright, "pimpy" color through restricted HCL space.
-// This is slower than FastHappyColor but will likely give you colors which
-// have the same "brightness" if you run it many times.
-func HappyColor() (c Color) {
- for c = randomPimp(); !c.IsValid(); c = randomPimp() {
- }
- return
-}
-
-func randomPimp() Color {
- return Hcl(
- rand.Float64()*360.0,
- 0.5+rand.Float64()*0.3,
- 0.5+rand.Float64()*0.3)
-}