[devdocsgjs/main: 886/1867] Update sprites:generate to apply dark icon fix less frequently
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 886/1867] Update sprites:generate to apply dark icon fix less frequently
- Date: Fri, 19 Nov 2021 23:47:34 +0000 (UTC)
commit 8fed7b8caeea380eccc7d9aa2678a360b3da8a11
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Sat Aug 24 00:07:21 2019 +0200
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]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]