History

Update sprites:generate to apply dark icon fix less frequently

Jasper van Merle committed 7 years ago

Commit 8fed7b81 parent 32ba4201 file · +2 −2Browse files

Unified · Split

lib/tasks/sprites.thor+2−2
@@ -109,7 +109,7 @@ class SpritesCLI < Thor · 108 unmodified lines
109109 end
110110
111111 avg = contrast.reduce(:+) / contrast.size.to_f
112− avg < 3.5
112+ avg < 2.5
113113 end
114114
115115 def get_contrast(base, other)
@@ -133,7 +133,7 @@ class SpritesCLI < Thor · 17 unmodified lines
133133
134134 rgb.map! do |value|
135135 value /= 255
136− value < 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4
136+ value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4
137137 end
138138
139139 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]