cpalette 0.0.4 → 0.0.5

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: 9ca1166f80c44a1306383d46600b20f57ee7b5af
4
- data.tar.gz: 58fada6e6e35dd4848f76ea2c865dd8e0ee3cb5d
3
+ metadata.gz: c81724f8b77e7868578b57539301575cda7c715b
4
+ data.tar.gz: 2ae699cbd1b0573d9026dd9131164bb5eea78c35
5
5
  SHA512:
6
- metadata.gz: a30b0c436d6577743b11ae7592c9ecfd1cda56fdbc74bd0635e2e78dd088524e81bd8f372dd99568524b4b304cd2a7dc09a66515e653775e6644db25dd3781e9
7
- data.tar.gz: e8f96bc900d787105827f07fdac16d1edb34dc31e48713014926fa8472eb91507ae28ab2d87666f9939ef6addebd6b777b5433f5b2a535fe52effe85c113c20c
6
+ metadata.gz: 7aee40652bad9dc1a00f9f268fd47f769e27b80cc71c8cf31971fcf5c509d4f0d47c47ff525a81d88e0a8e8e0e769127e01fc1d0678002e077b0141c641f5857
7
+ data.tar.gz: 5f7ef62eff03e9578f662466bed267a45760bed58c5605089c70cbf40af02e109b91b3d58400fb8cf54e9d420bbdba270d2aed78fa33bda33b12ceb0b60e19c5
data/README.md CHANGED
@@ -30,8 +30,9 @@ Or install it yourself as:
30
30
 
31
31
  Case 2:
32
32
  You can pass an option :hex => true, which would return you an array containing only Hex values of required number of colors.
33
+
33
34
 
34
- colors_array = Cpalette.palette(4, :hex => true)
35
+ colors_array = Cpalette.palette(4, {:hex => true})
35
36
 
36
37
  => ["#37e1de", "#a468e3", "#f0383b", "#a5e660"]
37
38
 
@@ -1,3 +1,3 @@
1
1
  module Cpalette
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/cpalette.rb CHANGED
@@ -43,7 +43,7 @@ module Cpalette
43
43
  h3 = b.to_s(16).length == 2 ? b.to_s(16) : "0"+b.to_s(16)
44
44
  return "##{h1}#{h2}#{h3}"
45
45
  end
46
- def self.palette(size, args)
46
+ def self.palette(size, options = {})
47
47
  color_palette = []
48
48
  hue_array = []
49
49
  hue = 359
@@ -64,8 +64,8 @@ module Cpalette
64
64
  color_codes["hex"] = rgb2hex(rgb[0].to_i, rgb[1].to_i, rgb[2].to_i)
65
65
  color_palette.push(color_codes) unless color_palette.include?(color_codes)
66
66
  end
67
- if args[:hex] != nil
68
- if args[:hex] == true
67
+ if options[:hex] != nil
68
+ if options[:hex] == true
69
69
  cpalette = []
70
70
  color_palette.each do |color|
71
71
  cpalette.push(color["hex"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpalette
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - avinash-vllbh