From 510e677c306febb1ac298131e3845727e5973c68 Mon Sep 17 00:00:00 2001 From: ltadeu6 Date: Sun, 7 Jun 2026 13:22:12 -0300 Subject: [PATCH] revert: use single dominant color on VU bars, drop secondary gradient Co-Authored-By: Claude Sonnet 4.6 --- plugin/contents/ui/dancer.html | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/plugin/contents/ui/dancer.html b/plugin/contents/ui/dancer.html index 2f59386..194b68c 100644 --- a/plugin/contents/ui/dancer.html +++ b/plugin/contents/ui/dancer.html @@ -1014,11 +1014,9 @@ requestAnimationFrame(flushBars); /* ============================================================ MUSIC-LIGHT THEME (album color) ============================================================ */ -function applyTheme(rgb, rgb2) { +function applyTheme(rgb) { const [r, g, b] = rgb; - const [r2, g2, b2] = rgb2 || [r, g, b]; document.documentElement.style.setProperty('--theme-color', `rgba(${r},${g},${b},1)`); - // Tint horizon with primary color horizonEl.style.background = `linear-gradient(to right, transparent 0%, rgba(${r},${g},${b},0.7) 20%, @@ -1027,14 +1025,9 @@ function applyTheme(rgb, rgb2) { transparent 100%)`; horizonEl.style.boxShadow = `0 0 30px rgba(${r},${g},${b},0.9), 0 0 90px rgba(${r},${g},${b},0.3)`; - // Apply primary→secondary gradient across VU bars - vuBars.forEach((bar, i) => { - const t = i / (vuBars.length - 1); - const br = Math.round(r + (r2 - r) * t); - const bg = Math.round(g + (g2 - g) * t); - const bb = Math.round(b + (b2 - b) * t); - bar.style.background = `rgb(${br},${bg},${bb})`; - bar.style.boxShadow = `0 0 4px rgba(${br},${bg},${bb},0.8)`; + vuBars.forEach(bar => { + bar.style.background = `rgb(${r},${g},${b})`; + bar.style.boxShadow = `0 0 4px rgba(${r},${g},${b},0.8)`; }); } @@ -1046,7 +1039,7 @@ function fetchTheme() { fetch('http://127.0.0.1:8765/current') .then(r => r.json()) .then(d => { - if (d.rgb) applyTheme(d.rgb, d.rgb2); + if (d.rgb) applyTheme(d.rgb); if (d.art_url && d.art_url !== lastArtUrl) { lastArtUrl = d.art_url; document.getElementById('albumArtImg').src =