Merge pull request #263 from JulienMaille/revert-261-patch-1

Revert "Add Sidebar Color Updates"
This commit is contained in:
morpheusthewhite 2021-02-08 22:18:03 +01:00 committed by GitHub
commit 45e5d3350f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 10 deletions

View File

@ -254,14 +254,11 @@ function updateColors(root) {
//root.style.setProperty('--modspotify_rgb_scrollbar_fg_and_selected_row_bg', darkerColRGB)
root.style.setProperty('--modspotify_rgb_selected_button', darkerColRGB)
//root.style.setProperty('--modspotify_rgb_miscellaneous_hover_bg', colRGB)
// Also update the color of the icons for bright and white backgrounds to remain readable.
var colRGB = colRGB.split(",")
var brightness = Math.round(((parseInt(colRGB[0]) * 299) +
(parseInt(colRGB[1]) * 587) +
(parseInt(colRGB[2]) * 114)) / 1000);
var textColour = (brightness > 125) ? '#000000' : '#ffffff';
root.style.setProperty('--modspotify_preserve_1', textColour);
isLightFg = isLight(colHex);
iconCol = getComputedStyle(document.documentElement).getPropertyValue(isLightFg ? '--modspotify_main_bg' : '--modspotify_secondary_fg');
root.style.setProperty('--modspotify_preserve_1', iconCol);
}
function updateColorsAllIframes() {

View File

@ -1246,7 +1246,7 @@ button#player-button-repeat,
.button.button-blue {
background-color: var(--modspotify_main_fg);
color: var(--modspotify_secondary_fg);
color: var(--modspotify_preserve_1);
}
/* Volume bar */
@ -1270,8 +1270,8 @@ button#player-button-repeat,
/* Notification */
.notification-bubble-container>div {
background: var(--modspotify_main_fg);
color: var(--modspotify_secondary_fg);
background-color: var(--modspotify_main_fg);
color: var(--modspotify_preserve_1);
}
.view-player .text-container .text-item-container .text-item .scroll-text-container:after {