color_code 0.1.0 → 0.1.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: f4a47ae103030ebc9914dd4b8c9d9726cd8b42c8
4
- data.tar.gz: f26c1f7ee3642aca7c17322a794894ef22463d1e
3
+ metadata.gz: 04c12bb81259d3101eb3053fbc860ed4bc781dfd
4
+ data.tar.gz: b463e4511965377b36077105a90eb3e9d924bb97
5
5
  SHA512:
6
- metadata.gz: 58eebdeb86de24fab4fb9658171d1f29b82c6585d564cab3c7db1cfa5c30e6ea2f8e18638e43bf142ae4c5cb465dffffd767e70356428c0e406d9c123d79e09d
7
- data.tar.gz: 7d51438470a3df775fffe7515ba6f1a86aebd17fa256e804b2649bb41b03ed46b5a660d818e0372c3fb930b5a1069dd836eed04319bb81ad213ba63da55d6c68
6
+ metadata.gz: 6be20c301d73ff5f28348f9b98d14d817f3c79f24180aa50fb40939a92a720b54f2488405559529fbc3ab455af77f79c0420979e9e5b400ad322fb41d92e0849
7
+ data.tar.gz: aa3bdd6d4a2837faa054d463b5d75fcfe42fa78d40641bb9c4e46001db12e0ebe882de488a942be70a83c54fb468bb5fbf05d784cb51154aaab14621a5db0cd5
data/README.md CHANGED
@@ -38,7 +38,7 @@ hsl.to_hash # => { h: 0, s: 100, l: 50 }
38
38
 
39
39
  convert RGB to HSL
40
40
 
41
- ``ruby
41
+ ```ruby
42
42
  rgb = ColorCode::RGB.new(r: 255, g: 0, b: 0)
43
43
  rgb.to_s # => '#ff0000'
44
44
  hsl = rgb.to_hsl
@@ -43,7 +43,7 @@ module ColorCode
43
43
  when @b
44
44
  60 * ((@r - @g) / (max - min)) + 240
45
45
  end
46
- hue + 360 if hue < 0
46
+ hue += 360 if hue < 0
47
47
  hue.round
48
48
  end
49
49
 
@@ -53,7 +53,7 @@ module ColorCode
53
53
  saturation = if converge < 128
54
54
  (max - min).quo(max + min).to_f
55
55
  else
56
- (max - min).quo(510 - max + min).to_f
56
+ (max - min).quo(510 - max - min).to_f
57
57
  end
58
58
  (saturation * 100).round
59
59
  end
@@ -1,3 +1,3 @@
1
1
  module ColorCode
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: color_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - shiro16
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-03-21 00:00:00.000000000 Z
11
+ date: 2015-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler