mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-06 08:11:39 +00:00
IMP: better color choice for some covers
This commit is contained in:
parent
608fc67ffb
commit
cab22d14c7
1 changed files with 10 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
let current = '1.1'
|
let current = '1.2'
|
||||||
|
|
||||||
/* css is injected so this works with untouched user.css from Dribbblish */
|
/* css is injected so this works with untouched user.css from Dribbblish */
|
||||||
/* dark theme */
|
/* dark theme */
|
||||||
|
|
@ -34,6 +34,13 @@ document.styleSheets[0].insertRule(`
|
||||||
background-color: rgba(var(--spice-rgb-subtext), 0.3) !important;
|
background-color: rgba(var(--spice-rgb-subtext), 0.3) !important;
|
||||||
}`)
|
}`)
|
||||||
|
|
||||||
|
/* unreadable top buttons */
|
||||||
|
document.styleSheets[0].insertRule(`
|
||||||
|
.main-topBar-historyButtons svg {
|
||||||
|
color: var(--spice-text) !important;
|
||||||
|
fill: var(--spice-text) !important;
|
||||||
|
}`)
|
||||||
|
|
||||||
/* big cover opacity on hover */
|
/* big cover opacity on hover */
|
||||||
document.styleSheets[0].insertRule(`
|
document.styleSheets[0].insertRule(`
|
||||||
.main-coverSlotExpanded-container:hover .cover-art,
|
.main-coverSlotExpanded-container:hover .cover-art,
|
||||||
|
|
@ -228,8 +235,8 @@ Spicetify.Player.addEventListener("songchange", songchange)
|
||||||
|
|
||||||
function pickCoverColor(img) {
|
function pickCoverColor(img) {
|
||||||
var swatches = new Vibrant(img, 12).swatches()
|
var swatches = new Vibrant(img, 12).swatches()
|
||||||
cols = isLight(mainColorBg) ? ["Vibrant", "DarkVibrant", "LightVibrant", "Muted"]
|
cols = isLight(mainColorBg) ? ["Vibrant", "DarkVibrant", "Muted", "LightVibrant"]
|
||||||
: ["Vibrant", "LightVibrant", "DarkVibrant", "Muted"]
|
: ["Vibrant", "LightVibrant", "Muted", "DarkVibrant"]
|
||||||
mainColor = "#509bf5"
|
mainColor = "#509bf5"
|
||||||
for (var col in cols)
|
for (var col in cols)
|
||||||
if (swatches[cols[col]]) {
|
if (swatches[cols[col]]) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue