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
109 end109 end
110 110
111 avg = contrast.reduce(:+) / contrast.size.to_f111 avg = contrast.reduce(:+) / contrast.size.to_f
112 avg < 3.5112 avg < 2.5
113 end113 end
114 114
115 def get_contrast(base, other)115 def get_contrast(base, other)
@@ -133,7 +133,7 @@ class SpritesCLI < Thor · 17 unmodified lines
133 133
134 rgb.map! do |value|134 rgb.map! do |value|
135 value /= 255135 value /= 255
136 value < 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4136 value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4
137 end137 end
138 138
139 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]139 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]