Extract colors
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m10s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m10s
This commit is contained in:
@@ -18,7 +18,11 @@ function setupThemeToggle() {
|
||||
syncThemeToggleButton(btn, isDark);
|
||||
|
||||
const meta = document.querySelector('meta[name="theme-color"]');
|
||||
if (meta) meta.setAttribute('content', isDark ? '#161513' : '#f3efe9');
|
||||
if (meta) {
|
||||
const varName = isDark ? '--sunken-deep-rgb' : '--app-bg-rgb';
|
||||
const rgb = getComputedStyle(document.documentElement).getPropertyValue(varName).trim();
|
||||
if (rgb) meta.setAttribute('content', `rgb(${rgb})`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user