jnylen-colorscore 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/colorscore/histogram.rb +1 -1
- data/lib/colorscore/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7f9613d48cd2d230ffaed4557af2bd174c6e0f75ae29ba928963cafbdf57e903
|
4
|
+
data.tar.gz: 41cb272366eae3a162ea1b8c17b099efcd46fcbbdea8c5369331a9bb2aa0c25b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea722c77854bd698b327cdceacc322b7a45f105d4ee921ea2faa78eb1a3c7f9ff31417f4f02e587bfd388ffd14c4f5720b85302e9fb06fd829331bb3c99852c9
|
7
|
+
data.tar.gz: 855c37ac51300fb071624421ea07d4b73d68329ad4243cdcb96ce5f778f110b286c7d6045c1089edb93e9c542cfe36431490ae1ab2d4d1cda615086bfb7ea727
|
data/lib/colorscore/histogram.rb
CHANGED
@@ -22,7 +22,7 @@ module Colorscore
|
|
22
22
|
|
23
23
|
# Returns an array of colors in descending order of occurances.
|
24
24
|
def colors
|
25
|
-
hex_values = @lines.map { |line| line[/#([0-9A-F]{6})
|
25
|
+
hex_values = @lines.map { |line| line[/#([0-9A-F]{6})/, 1] }.compact
|
26
26
|
hex_values.map { |hex| Color::RGB.from_html(hex) }
|
27
27
|
end
|
28
28
|
|
data/lib/colorscore/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jnylen-colorscore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joakim Nylén
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: color
|
@@ -96,8 +96,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.7.7
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Finds the dominant colors in an image.
|
103
|
-
test_files:
|
103
|
+
test_files:
|
104
|
+
- test/fixtures/skydiver.jpg
|
105
|
+
- test/fixtures/transparency.png
|
106
|
+
- test/histogram_test.rb
|
107
|
+
- test/metrics_test.rb
|
108
|
+
- test/palette_test.rb
|
109
|
+
- test/test_helper.rb
|