From 94a1981a4cc5453bacf2dba66e710d142f1f3c52 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Tue, 22 Sep 2026 20:14:46 +0200 Subject: [PATCH] Soften dark-mode accent colors (buttons and text) Dark mode's accent chroma came from the ACCENT_CHROMA constant (0.145, originally meant as a generic default), used unconditionally for every accent-derived token regardless of the actual song's extracted vividness - extractAccent() already clamps a song's real chroma to 0.045-0.11, but buildThemeTokens() never used it, only the hue. That made every accent button, ring and highlight uniformly vivid. Drop it to 0.09. Also soften --mf-accent-title (the accent-colored track title text, e.g. active rows) from 0.07 to 0.05 chroma, since that was called out specifically as too strong. Cleaned up the now-unused C/ACCENT_CHROMA import. --- web-player/src/lib/theme/tokens.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web-player/src/lib/theme/tokens.ts b/web-player/src/lib/theme/tokens.ts index 9275f0b..b9fcddb 100644 --- a/web-player/src/lib/theme/tokens.ts +++ b/web-player/src/lib/theme/tokens.ts @@ -1,7 +1,6 @@ -import { ACCENT_CHROMA, ACCENT_LIGHTNESS } from './color'; +import { ACCENT_LIGHTNESS } from './color'; const L = ACCENT_LIGHTNESS / 100; -const C = ACCENT_CHROMA; function r(value: number, digits = 4): string { return value.toFixed(digits); @@ -32,9 +31,9 @@ export function buildThemeTokens(hue: number, mode: 'dark' | 'light' = 'dark'): const light = mode === 'light'; const accentL = light ? 0.52 : L; - const accentC = light ? 0.16 : C; + const accentC = light ? 0.16 : 0.09; const titleL = light ? 0.4 : 0.87; - const titleC = light ? 0.13 : 0.07; + const titleC = light ? 0.13 : 0.05; const mutedL = light ? 0.48 : 0.79; const mutedC = light ? 0.06 : 0.035;