[design] improve link item name colour

This commit is contained in:
zombieFox
2020-07-23 17:02:19 +01:00
parent 77a38bab21
commit 4ef9127efb

View File

@ -1363,17 +1363,25 @@ var link = (function() {
var shades = theme.mod.color.shades({ var shades = theme.mod.color.shades({
rgb: stagedLink.link.color.rgb, rgb: stagedLink.link.color.rgb,
contrastNegative: 8, contrastNegative: 7,
contrastPositive: 8 contrastPositive: 7
}); });
var rgb; var rgb;
if (hsl.l <= 50) { if (hsl.l <= 50) {
rgb = shades.positive["9"]; if (hsl.l > 30 && hsl.l <= 50 && hsl.h > 40 && hsl.h < 200) {
linkItemStyle.push("--theme-style-text: var(--theme-white);"); rgb = shades.negative["9"];
} else {
rgb = shades.positive["9"];
};
} else { } else {
rgb = shades.negative["9"]; 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);"); linkItemStyle.push("--theme-style-text: var(--theme-black);");
}; };