From 5447fac00048b1acbcaf4d23b3daf3c361910b66 Mon Sep 17 00:00:00 2001 From: Philippe Schommers Date: Fri, 27 Oct 2023 11:43:48 +0200 Subject: [PATCH] feat: sets the right theme color (for iPhones) --- src/lib/utils/color.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/utils/color.ts b/src/lib/utils/color.ts index 75cfeeef..0052b905 100644 --- a/src/lib/utils/color.ts +++ b/src/lib/utils/color.ts @@ -97,4 +97,10 @@ export function changeColors(baseColor: string, darkMode: DarkMode) { document.documentElement.style.removeProperty(name) document.documentElement.style.removeProperty(`${name}-rgb`) }) + + // Set theme color + const themeColorNode = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement + if (themeColorNode) { + themeColorNode.content = isDarkMode ? '#000000' : '#ffffff' + } }