rand_palette 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/rand_palette.rb +2 -0
- data/lib/rand_palette/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cb7cb9a1464229a87bf98d1e352b4962ffbd2608359853c108522402367e18ef
|
4
|
+
data.tar.gz: bb9d1a47c63e153474d123735e3b408dce0c1a01d55f341faf69ef69e1a87443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a482db94075efa703159b999dd4f625c9302cd80eb031f326ac8bce55ddc4d1d40d8a77e5ac0f64fa8dc942e6a2e5bbd3970ce8064ec620d8009d56a63ebb362
|
7
|
+
data.tar.gz: d641517a9594b57bbf91c302075a8caff87264814a9345048f3f555bf81f40b30dcee778c253e348e4757e48c9ba571c7ca0929c1eff62985e3760e151ada052
|
data/lib/rand_palette.rb
CHANGED
@@ -13,7 +13,9 @@ module RandPalette
|
|
13
13
|
ScalarDesc.map{|c| [255, 0, c] }].flatten 1
|
14
14
|
|
15
15
|
def self.random n, alpha: 1
|
16
|
+
return [] if n <= 0
|
16
17
|
raise RangeError, "No more than #{range} kinds od color" if n > range
|
18
|
+
|
17
19
|
picked = rand range
|
18
20
|
steps = range / n
|
19
21
|
n.times.map do |t|
|
data/lib/rand_palette/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rand_palette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,8 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
|
94
|
-
rubygems_version: 2.6.8
|
93
|
+
rubygems_version: 3.0.3
|
95
94
|
signing_key:
|
96
95
|
specification_version: 4
|
97
96
|
summary: randam colors
|