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.
This commit is contained in:
2026-09-22 20:14:46 +02:00
parent 2272a401bb
commit 94a1981a4c
+3 -4
View File
@@ -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;