Update sprites:generate to apply dark icon fix less frequently

pull/1073/head
Jasper van Merle 5 years ago
parent 32ba4206ff
commit 8fed7b8cae

@ -109,7 +109,7 @@ class SpritesCLI < Thor
end
avg = contrast.reduce(:+) / contrast.size.to_f
avg < 3.5
avg < 2.5
end
def get_contrast(base, other)
@ -133,7 +133,7 @@ class SpritesCLI < Thor
rgb.map! do |value|
value /= 255
value < 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4
value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4
end
0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]

Loading…
Cancel
Save