color-proximity 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26f66c6cc2bf0d6b54e23835bfd0641a6defdc89
4
- data.tar.gz: 3f1f9533450447ee0ac35b51fc06f49d68229fd1
3
+ metadata.gz: a880f0e217f7a426eee1e5f712d2fac53ca25be8
4
+ data.tar.gz: 9e5edb656bc21e5fee2aad0ae0a81e8dd6fa0184
5
5
  SHA512:
6
- metadata.gz: d715b66926a465a0c49b719d49d6d1df7b6082fbe7236183726515dfec04d1db3adf77ed99d9a6821d1f6f050480bdf37ddc8fd77e114268803ab162372da237
7
- data.tar.gz: 0731b9f9bf36ca012dcde04f0a6a51b2e9ce259d0cfcaf52946d4a5531fb229249a4bf490f9b46b4ec1d73a8711a0d2b38ccb4f602003c1aa72f4a9e34bd7746
6
+ metadata.gz: f2b0d95318e56e179a3896aab8c87987fe5c13aea1f952d2a5a2cbfaaa41f12f5bb1c2a5901e7910fabccf8adcadaca3f10c708aa8332dbfcdfbda711b08b2b6
7
+ data.tar.gz: 58aca5fe7dac92dba9f37b443a218deb6c48f87aa5d6694a54ed0cfeceb182ecf7c01d0e8f4a68e742216b2980d243f3b495634aee6ea01e4519a7e806dd7d0b
data/README.md CHANGED
@@ -11,10 +11,10 @@ Given a threshold and a collection of colors, you'll be able to determine how cl
11
11
  ``` ruby
12
12
  require 'color-proximity'
13
13
  cp = ColorProximity.new(0.5, ['000000'])
14
- cp.within_threshold?('000000') # [false, ['000000']]
14
+ cp.past_threshold?('000000') # [false, ['000000']]
15
15
 
16
16
  cp.collection = ['ffffff'])
17
- cp.within_threshold?('000000') # [true]
17
+ cp.past_threshold?('000000') # [true]
18
18
 
19
19
  cp.collection = ['000001', '000002', 'ffffff'])
20
20
  cp.thresholds('000003') # [3.3166247903554, 1.4142135623730951, 762.3437544835007]
@@ -10,7 +10,7 @@ class ColorProximity
10
10
  @collection = collection
11
11
  end
12
12
 
13
- def within_threshold?(color)
13
+ def past_threshold?(color)
14
14
  @collection.each_with_object([true]) do |collection_color, arr|
15
15
  proximity = proximity_of(color, collection_color)
16
16
  next unless @threshold > proximity
@@ -1,3 +1,3 @@
1
1
  class ColorProximity
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: color-proximity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-03 00:00:00.000000000 Z
11
+ date: 2015-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: color_difference