Skip to content

Commit 4ef9127

Browse files
committed
[design] improve link item name colour
1 parent 77a38ba commit 4ef9127

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎src/js/link.js‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,17 +1363,25 @@ var link = (function(){
13631363

13641364
varshades=theme.mod.color.shades({
13651365
rgb: stagedLink.link.color.rgb,
1366-
contrastNegative: 8,
1367-
contrastPositive: 8
1366+
contrastNegative: 7,
1367+
contrastPositive: 7
13681368
});
13691369

13701370
varrgb;
13711371

13721372
if(hsl.l<=50){
1373-
rgb=shades.positive["9"];
1374-
linkItemStyle.push("--theme-style-text: var(--theme-white);");
1373+
if(hsl.l>30&&hsl.l<=50&&hsl.h>40&&hsl.h<200){
1374+
rgb=shades.negative["9"];
1375+
}else{
1376+
rgb=shades.positive["9"];
1377+
};
13751378
}else{
13761379
rgb=shades.negative["9"];
1380+
};
1381+
1382+
if(hsl.l<=50){
1383+
linkItemStyle.push("--theme-style-text: var(--theme-white);");
1384+
}else{
13771385
linkItemStyle.push("--theme-style-text: var(--theme-black);");
13781386
};
13791387

0 commit comments

Comments
(0)