From 8fed7b8caeea380eccc7d9aa2678a360b3da8a11 Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Sat, 24 Aug 2019 00:07:21 +0200 Subject: [PATCH] Update sprites:generate to apply dark icon fix less frequently --- lib/tasks/sprites.thor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/sprites.thor b/lib/tasks/sprites.thor index 1c0d3600..b1f76b56 100644 --- a/lib/tasks/sprites.thor +++ b/lib/tasks/sprites.thor @@ -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]