feat: 新增主题色切换功能 默认为日间主题可切换夜间 (#19、#21)

fixes #19  #21
This commit is contained in:
alger
2024-12-28 16:43:52 +08:00
parent f728191a8f
commit abdb2bcd50
34 changed files with 772 additions and 758 deletions
+2
View File
@@ -186,6 +186,7 @@ function hslToRgb(h: number, s: number, l: number): [number, number, number] {
interface ITextColors {
primary: string;
active: string;
theme: string;
}
// 添加新的函数
@@ -230,6 +231,7 @@ export const getTextColors = (gradient: string = ''): ITextColors => {
return {
primary: isDark ? 'rgba(0, 0, 0, 0.54)' : 'rgba(255, 255, 255, 0.54)',
active: isDark ? '#000000' : '#ffffff',
theme: isDark ? 'dark' : 'light',
};
};