diff --git a/src/components/layout/AppShell/Aurora.tsx b/src/components/layout/AppShell/Aurora.tsx index 2cf9fec..31e9578 100644 --- a/src/components/layout/AppShell/Aurora.tsx +++ b/src/components/layout/AppShell/Aurora.tsx @@ -107,8 +107,23 @@ function hexToRgb(hex: string): [number, number, number] { return [r, g, b]; } +// Reduce lightness of a hex color for subdued background blobs +function dimAccent(hex: string, factor = 0.45): string { + hex = hex.replace('#', ''); + if (hex.length === 3) { + hex = hex + .split('') + .map((c) => c + c) + .join(''); + } + const r = Math.round(parseInt(hex.substring(0, 2), 16) * factor); + const g = Math.round(parseInt(hex.substring(2, 4), 16) * factor); + const b = Math.round(parseInt(hex.substring(4, 6), 16) * factor); + return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`; +} + function generateColorStops(background: string, surface: string, accent: string): string[] { - return [background, surface, accent]; + return [background, surface, dimAccent(accent)]; } export function Aurora() { diff --git a/src/styles/globals.css b/src/styles/globals.css index d1e271c..f9e1881 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -1436,7 +1436,7 @@ input[type='checkbox']:hover:not(:checked) { .wave-blob-1 { width: 400px; height: 400px; - background: radial-gradient(circle, rgba(var(--color-accent-500), 0.6) 0%, transparent 70%); + background: radial-gradient(circle, rgba(var(--color-accent-800), 0.6) 0%, transparent 70%); top: -15%; left: -10%; animation: wave1 20s ease-in-out infinite; /* Slower = less CPU */ @@ -1517,7 +1517,7 @@ input[type='checkbox']:hover:not(:checked) { } .light .wave-blob-1 { - background: radial-gradient(circle, rgba(var(--color-accent-500), 0.7) 0%, transparent 70%); + background: radial-gradient(circle, rgba(var(--color-accent-800), 0.7) 0%, transparent 70%); } /* Mobile: brighter and faster animations */ @@ -1530,7 +1530,7 @@ input[type='checkbox']:hover:not(:checked) { .wave-blob-1 { width: 300px; height: 300px; - background: radial-gradient(circle, rgba(var(--color-accent-500), 0.8) 0%, transparent 70%); + background: radial-gradient(circle, rgba(var(--color-accent-800), 0.8) 0%, transparent 70%); animation: wave1-mobile 12s ease-in-out infinite; }