camalian 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/camalian/quantization/histogram.rb +4 -1
- data/lib/camalian/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b9de2c66339ca8ad016f7008d1737b6015bf0a69c5ebfb420d31f4183a52257
|
4
|
+
data.tar.gz: 8280252df27703b1bb26bbbb86ba8af9749c7e9daefb5ed4b6c74db445273777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6220b18f426c0a30240a98afb98e1217d9aab1947051c9b305a5b7f6d413e71c4a8ef7420ecafed128eab0428fd28f9ee2e844ad30d06fa80fa5a1d2900b9cfa
|
7
|
+
data.tar.gz: 8e7d6b392ffda8cf50dfbbdec3bdf75bfd050d7f50618b0236cb1848e6802d0fc8abaed7c522c263f533a9be67108d866679a176f80ca88db6e27e9aa5e063f2
|
data/README.md
CHANGED
@@ -13,7 +13,10 @@ module Camalian
|
|
13
13
|
buckets[key].push(color)
|
14
14
|
end
|
15
15
|
|
16
|
-
|
16
|
+
buckets = buckets.values
|
17
|
+
buckets = buckets.sort_by(&:size).reverse
|
18
|
+
average_colors = buckets.map(&:average_color)
|
19
|
+
Palette.new(average_colors[0...count])
|
17
20
|
end
|
18
21
|
|
19
22
|
private
|
data/lib/camalian/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camalian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nazar Hussain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chunky_png
|