From 44378cc87943f8ffbd2fb68699f82cb1ce0d741e Mon Sep 17 00:00:00 2001 From: icarus Date: Sat, 1 Nov 2025 14:10:56 +0800 Subject: [PATCH] feat(theme): add primary-foreground color variable to body styles --- src/renderer/src/hooks/useUserTheme.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/src/hooks/useUserTheme.ts b/src/renderer/src/hooks/useUserTheme.ts index acac9b00d5..bd43377be7 100644 --- a/src/renderer/src/hooks/useUserTheme.ts +++ b/src/renderer/src/hooks/useUserTheme.ts @@ -14,6 +14,7 @@ export default function useUserTheme() { const colorPrimary = Color(theme.colorPrimary) document.body.style.setProperty('--color-primary', colorPrimary.toString()) + document.body.style.setProperty('--color-primary-foreground', getForegroundColor(colorPrimary.hex())) // overwrite hero UI primary color. document.body.style.setProperty('--primary', colorPrimary.toString()) document.body.style.setProperty('--primary-foreground', getForegroundColor(colorPrimary.hex()))