From 93d4220f3abce0faee783c68be90d5a604a8b4f9 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Tue, 22 Sep 2026 20:33:25 +0200 Subject: [PATCH] Make accent backgrounds solid so they don't stack on tinted surfaces --mf-accent-soft-bg/--mf-accent-btn-bg/-hover were translucent alpha overlays, so an accent-tinted element (e.g. the active-row highlight, or the accent Button) rendered differently depending on what was already underneath it: fine over the plain page background, but over an already-tinted surface like the spotlight card, the two translucent layers stacked and the combined result read brighter/more saturated than intended. Same fix as bg-btn earlier: replace the alpha overlay with a solid color-mix() against --mf-bg, computed once, so the token always renders identically regardless of what it's placed on top of. Verified the active-row highlight and the accent button now compute to the exact same color whether they sit on the plain background or on the spotlight card. --- web-player/src/lib/theme/tokens.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web-player/src/lib/theme/tokens.ts b/web-player/src/lib/theme/tokens.ts index d6773e5..992eb44 100644 --- a/web-player/src/lib/theme/tokens.ts +++ b/web-player/src/lib/theme/tokens.ts @@ -37,11 +37,11 @@ export function buildThemeTokens(hue: number, mode: 'dark' | 'light' = 'dark'): '--mf-accent': `oklch(${r(accentL)} ${r(accentC)} ${H})`, '--mf-accent-title': `oklch(${r(titleL)} ${r(titleC)} ${H})`, '--mf-accent-muted': `oklch(${r(mutedL)} ${r(mutedC)} ${H})`, - '--mf-accent-soft-bg': `oklch(${r(accentL)} ${r(accentC)} ${H} / 0.08)`, + '--mf-accent-soft-bg': `color-mix(in srgb, oklch(${r(accentL)} ${r(accentC)} ${H}) 8%, var(--mf-bg))`, '--mf-accent-line': `oklch(${r(accentL)} ${r(accentC)} ${H} / 0.2)`, '--mf-accent-hair': `oklch(${r(accentL)} ${r(accentC)} ${H} / 0.09)`, - '--mf-accent-btn-bg': `oklch(${r(accentL)} ${r(accentC)} ${H} / 0.15)`, - '--mf-accent-btn-bg-hover': `oklch(${r(accentL)} ${r(accentC)} ${H} / 0.24)`, + '--mf-accent-btn-bg': `color-mix(in srgb, oklch(${r(accentL)} ${r(accentC)} ${H}) 15%, var(--mf-bg))`, + '--mf-accent-btn-bg-hover': `color-mix(in srgb, oklch(${r(accentL)} ${r(accentC)} ${H}) 24%, var(--mf-bg))`, '--mf-bg': light ? `oklch(0.97 0.014 ${H})` : `oklch(0.075 0.02 ${H})`, '--mf-elevated': light ? `oklch(0.99 0.008 ${H})` : `oklch(0.12 0.025 ${H})`, '--mf-panel-bg': light ? `oklch(0.97 0.014 ${H} / 0.7)` : `oklch(0.1 0.022 ${H} / 0.28)`,