feat: 在生成主题色时考虑暗黑模式和亮色模式的不同需求

新增 getDarkColor 和 getLightColor 函数分别用于加深和变浅颜色值

BREAKING CHANGE: 优化颜色调整算法,使主题色在不同模式下更加协调
This commit is contained in:
zimo493
2025-04-03 09:30:42 +08:00
parent 738e7eed69
commit b96b527650
2 changed files with 40 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ export const useSettingsStore = defineStore("setting", () => {
[theme, themeColor],
([newTheme, newThemeColor]) => {
toggleDarkMode(newTheme === ThemeMode.DARK);
const colors = generateThemeColors(newThemeColor);
const colors = generateThemeColors(newThemeColor, newTheme);
applyTheme(colors);
},
{ immediate: true }