diff --git a/static/js/markdown.js b/static/js/markdown.js index 9d9b189..0d8b97d 100644 --- a/static/js/markdown.js +++ b/static/js/markdown.js @@ -54,13 +54,21 @@ const svgChangeTheme = (mode) => { const treshold = 128; + const style = "filter: "; + const dim = "brightness(0.8) contrast(1.2)"; + if (averageGrayscale < treshold && mode === Mode.Dark) { - item.style = "filter: invert(1);"; + item.style = style + dim + " invert(1);"; continue; } if (averageGrayscale > treshold && mode === Mode.Light) { - item.style = "filter: invert(1);"; + item.style = style + "invert(1);"; + continue; + } + + if (mode === Mode.Dark) { + item.style = style + `${dim};`; continue; }