diff --git a/frontend/packages/dashboard/src/home.js b/frontend/packages/dashboard/src/home.js index 944c6d1d..70b13dc6 100644 --- a/frontend/packages/dashboard/src/home.js +++ b/frontend/packages/dashboard/src/home.js @@ -78,8 +78,14 @@ function startMatrixRain() { return /^rgb/.test(c) ? c : fallback; } const glyphColor = resolveColor('--green', 'rgb(166, 227, 161)'); - const fadeColor = resolveColor('--bg', 'rgb(30, 30, 46)') - .replace(/^rgb\(/, 'rgba(').replace(/\)$/, ', 0.09)'); + // Fade-trail = the bg at low alpha. Pull r,g,b numerically rather than + // string-rewriting the rgb() — robust to whatever rgb()/rgba() spacing + // getComputedStyle hands back, so the trail always fades (never fills + // solid) even if the format shifts. + const bgRGB = resolveColor('--bg', 'rgb(30, 30, 46)').match(/(\d+)[^\d]+(\d+)[^\d]+(\d+)/); + const fadeColor = bgRGB + ? `rgba(${bgRGB[1]}, ${bgRGB[2]}, ${bgRGB[3]}, 0.09)` + : 'rgba(30, 30, 46, 0.09)'; const GLYPHS = 'アイウエオカキクケコサシスセソタチツテト0123456789:=*+-<>¦'; const CELL = 16; // glyph cell size (px)