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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 03236522cecb33ba31371d45b6a2c8ad1645bdbf
4
- data.tar.gz: 3a4fa073e20cc75df25b598de162b80d9497e93b
2
+ SHA256:
3
+ metadata.gz: cb7cb9a1464229a87bf98d1e352b4962ffbd2608359853c108522402367e18ef
4
+ data.tar.gz: bb9d1a47c63e153474d123735e3b408dce0c1a01d55f341faf69ef69e1a87443
5
5
  SHA512:
6
- metadata.gz: bb855c140c604d0556cec26a3c7c1316cefa223e8087bbc63fa5586bf1d370b629f5ba396393fe733d7686266554417940f6e12ae3816ab7de57d0faa51a9dca
7
- data.tar.gz: 36d4b7a20340de9026147bc9b8e7a01a2913438af658797ea677911e9a93725046e59af57a521df162266180238f772061b1a04b76d6429c5fcfc3e1bdef11d5
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|
@@ -1,3 +1,3 @@
1
1
  module RandPalette
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2017-04-15 00:00:00.000000000 Z
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
- rubyforge_project:
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