From 4ef9127efb235fb49f3131b22e0db3fa1f5d60d2 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Thu, 23 Jul 2020 17:02:19 +0100 Subject: [PATCH] [design] improve link item name colour --- src/js/link.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/js/link.js b/src/js/link.js index 179d878c..1751a38f 100644 --- a/src/js/link.js +++ b/src/js/link.js @@ -1363,17 +1363,25 @@ var link = (function() { var shades = theme.mod.color.shades({ rgb: stagedLink.link.color.rgb, - contrastNegative: 8, - contrastPositive: 8 + contrastNegative: 7, + contrastPositive: 7 }); var rgb; if (hsl.l <= 50) { - rgb = shades.positive["9"]; - linkItemStyle.push("--theme-style-text: var(--theme-white);"); + if (hsl.l > 30 && hsl.l <= 50 && hsl.h > 40 && hsl.h < 200) { + rgb = shades.negative["9"]; + } else { + rgb = shades.positive["9"]; + }; } else { rgb = shades.negative["9"]; + }; + + if (hsl.l <= 50) { + linkItemStyle.push("--theme-style-text: var(--theme-white);"); + } else { linkItemStyle.push("--theme-style-text: var(--theme-black);"); };