Skip to content

Commit 830c3db

Browse files
committed
version 0.2.1 bugfix
1 parent d59d8a6 commit 830c3db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

is_dark.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |s|
44
s.name = 'is_dark'
5-
s.version = '0.2.0'
5+
s.version = '0.2.1'
66
s.summary = 'Detects a dark background under an area or by a color code'
77
s.description = 'Detects a dark color based on luminance W3 standarts ' \
88
"( https://www.w3.org/TR/WCAG20/#relativeluminancedef ). \n\n " \

lib/is_dark.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def magick_area_from_blob(x, y, blob, height, width)
8383
dots = []
8484
@matrix.each do |xx|
8585
@matrix.each do |yy|
86-
dots << { x: (x + (width * xx / 10)).to_i, y: (y + (height * yy / 10)).to_i }
86+
dots << { x: (x + (width * xx / @matrix.count)).to_i, y: (y + (height * yy / @matrix.count)).to_i }
8787
end
8888
end
8989

0 commit comments

Comments
 (0)