  } else {
                r = (1 - ((ratio - 10) / ((ratio - 10) + 1000))) * 255;
            }
        }

        if (document.documentElement.getAttribute('data-theme') == 'dark') {
            r /= 1.5;
            g /= 1.5;
            b /= 1.5;
        }

        elem.style.backgroundColor = `rgb(${r}, ${g}, ${b})`;
        if (ratio === null || ratio > 10) {
            /// This will look better on dark backgrounds
            elem.style.color = 'white';
        } else {
            elem.style.color 