|
|
@@ -4,41 +4,41 @@ import twc from './tailwindColor'
|
|
|
import type { GlobalThemeOverrides } from 'naive-ui'
|
|
|
|
|
|
const DARK = {
|
|
|
- baseColor: twc.neutral[250],
|
|
|
- textColorBase: twc.neutral[250],
|
|
|
- textColor1: twc.neutral[350],
|
|
|
- textColor2: twc.neutral[350],
|
|
|
- textColor3: twc.neutral[450],
|
|
|
- borderColor: twc.neutral[800],
|
|
|
+ baseColor: twc.blue[950], // 修改基础颜色为深蓝色
|
|
|
+ textColorBase: twc.gray[50], // 文字颜色改为白色以提高对比度
|
|
|
+ textColor1: twc.gray[200],
|
|
|
+ textColor2: twc.gray[300],
|
|
|
+ textColor3: twc.gray[400],
|
|
|
+ borderColor: twc.blue[900],
|
|
|
}
|
|
|
|
|
|
const closeIconColor = (primaryColor: string) => {
|
|
|
return {
|
|
|
- closeIconColorSuccess: twc.lime[600],
|
|
|
- closeIconColorInfo: twc.sky[600],
|
|
|
- closeIconColorWarning: twc.amber[600],
|
|
|
- closeIconColorError: twc.pink[600],
|
|
|
+ closeIconColorSuccess: twc.green[500],
|
|
|
+ closeIconColorInfo: twc.blue[400],
|
|
|
+ closeIconColorWarning: twc.orange[400],
|
|
|
+ closeIconColorError: twc.red[400],
|
|
|
closeIconColorLoading: primaryColor,
|
|
|
|
|
|
- closeColorHoverSuccess: cah(twc.lime[500], 0.1),
|
|
|
- closeIconColorHoverSuccess: cdh(twc.lime[500], 0.2),
|
|
|
- closeColorPressedSuccess: cah(twc.lime[500], 0.16),
|
|
|
- closeIconColorPressedSuccess: cdh(twc.lime[500], 0.6),
|
|
|
+ closeColorHoverSuccess: cah(twc.green[500], 0.1),
|
|
|
+ closeIconColorHoverSuccess: cdh(twc.green[500], 0.2),
|
|
|
+ closeColorPressedSuccess: cah(twc.green[500], 0.16),
|
|
|
+ closeIconColorPressedSuccess: cdh(twc.green[500], 0.6),
|
|
|
|
|
|
- closeColorHoverInfo: cah(twc.sky[500], 0.1),
|
|
|
- closeIconColorHoverInfo: cdh(twc.sky[500], 0.2),
|
|
|
- closeColorPressedInfo: cah(twc.sky[500], 0.16),
|
|
|
- closeIconColorPressedInfo: cdh(twc.sky[500], 0.6),
|
|
|
+ closeColorHoverInfo: cah(twc.blue[400], 0.1),
|
|
|
+ closeIconColorHoverInfo: cdh(twc.blue[400], 0.2),
|
|
|
+ closeColorPressedInfo: cah(twc.blue[400], 0.16),
|
|
|
+ closeIconColorPressedInfo: cdh(twc.blue[400], 0.6),
|
|
|
|
|
|
- closeColorHoverWarning: cah(twc.amber[500], 0.1),
|
|
|
- closeIconColorHoverWarning: cdh(twc.amber[500], 0.2),
|
|
|
- closeColorPressedWarning: cah(twc.amber[500], 0.16),
|
|
|
- closeIconColorPressedWarning: cdh(twc.amber[500], 0.6),
|
|
|
+ closeColorHoverWarning: cah(twc.orange[400], 0.1),
|
|
|
+ closeIconColorHoverWarning: cdh(twc.orange[400], 0.2),
|
|
|
+ closeColorPressedWarning: cah(twc.orange[400], 0.16),
|
|
|
+ closeIconColorPressedWarning: cdh(twc.orange[400], 0.6),
|
|
|
|
|
|
- closeColorHoverError: cah(twc.pink[500], 0.14),
|
|
|
- closeIconColorHoverError: cdh(twc.pink[500], 0.2),
|
|
|
- closeColorPressedError: cah(twc.pink[500], 0.16),
|
|
|
- closeIconColorPressedError: cdh(twc.pink[500], 0.6),
|
|
|
+ closeColorHoverError: cah(twc.red[400], 0.14),
|
|
|
+ closeIconColorHoverError: cdh(twc.red[400], 0.2),
|
|
|
+ closeColorPressedError: cah(twc.red[400], 0.16),
|
|
|
+ closeIconColorPressedError: cdh(twc.red[400], 0.6),
|
|
|
|
|
|
closeColorHoverLoading: cah(primaryColor, 0.14),
|
|
|
closeIconColorHoverLoading: cdh(primaryColor, 0.2),
|
|
|
@@ -47,135 +47,113 @@ const closeIconColor = (primaryColor: string) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-export function baseDarkThemeOverrides(primaryColor = ''): GlobalThemeOverrides {
|
|
|
+export function baseDarkThemeOverrides(primaryColor = twc.blue[500]): GlobalThemeOverrides {
|
|
|
return {
|
|
|
common: {
|
|
|
baseColor: DARK.baseColor,
|
|
|
-
|
|
|
textColorBase: DARK.textColorBase,
|
|
|
-
|
|
|
textColor1: DARK.textColor1,
|
|
|
-
|
|
|
textColor2: DARK.textColor2,
|
|
|
-
|
|
|
textColor3: DARK.textColor3,
|
|
|
-
|
|
|
- bodyColor: twc.neutral[950],
|
|
|
-
|
|
|
- borderColor: DARK.borderColor,
|
|
|
-
|
|
|
- cardColor: twc.neutral[900],
|
|
|
-
|
|
|
- hoverColor: twc.neutral[650],
|
|
|
-
|
|
|
- modalColor: twc.neutral[800],
|
|
|
-
|
|
|
- popoverColor: twc.neutral[750],
|
|
|
-
|
|
|
- scrollbarColor: twc.neutral[800],
|
|
|
- scrollbarColorHover: twc.neutral[750],
|
|
|
-
|
|
|
- closeIconColor: cbh(twc.neutral[400], 0.2),
|
|
|
- closeColorHover: cah(twc.neutral[400], 0.1),
|
|
|
- closeIconColorPressed: twc.neutral[400],
|
|
|
- closeColorPressed: cah(twc.neutral[400], 0.14),
|
|
|
-
|
|
|
- infoColor: twc.sky[650],
|
|
|
- infoColorHover: cdh(twc.sky[650], 0.1),
|
|
|
- infoColorPressed: cdh(twc.sky[650], 0.2),
|
|
|
- infoColorSuppl: twc.sky[650],
|
|
|
-
|
|
|
- successColor: twc.lime[650],
|
|
|
- successColorHover: cdh(twc.lime[650], 0.1),
|
|
|
- successColorPressed: cdh(twc.lime[650], 0.2),
|
|
|
- successColorSuppl: twc.lime[650],
|
|
|
-
|
|
|
- warningColor: twc.amber[650],
|
|
|
- warningColorHover: cdh(twc.amber[650], 0.1),
|
|
|
- warningColorPressed: cdh(twc.amber[650], 0.2),
|
|
|
- warningColorSuppl: twc.amber[650],
|
|
|
-
|
|
|
- errorColor: twc.pink[650],
|
|
|
- errorColorHover: cdh(twc.pink[650], 0.1),
|
|
|
- errorColorPressed: cdh(twc.pink[650], 0.2),
|
|
|
- errorColorSuppl: twc.pink[650],
|
|
|
+ bodyColor: twc.blue[950], // 修改背景色为深蓝色
|
|
|
+ cardColor: twc.blue[850], // 修改卡片颜色为科技蓝
|
|
|
+ hoverColor: twc.blue[700],
|
|
|
+ modalColor: twc.blue[800], // 修改模态框颜色为科技蓝
|
|
|
+ popoverColor: twc.blue[750], // 修改弹出框颜色为科技蓝
|
|
|
+ scrollbarColor: twc.blue[800],
|
|
|
+ scrollbarColorHover: twc.blue[750],
|
|
|
+ closeIconColor: cbh(twc.blue[400], 0.2),
|
|
|
+ closeColorHover: cah(twc.blue[400], 0.1),
|
|
|
+ closeIconColorPressed: twc.blue[400],
|
|
|
+ closeColorPressed: cah(twc.blue[400], 0.14),
|
|
|
+ infoColor: twc.blue[600],
|
|
|
+ infoColorHover: cdh(twc.blue[600], 0.1),
|
|
|
+ infoColorPressed: cdh(twc.blue[600], 0.2),
|
|
|
+ infoColorSuppl: twc.blue[600],
|
|
|
+ successColor: twc.green[600],
|
|
|
+ successColorHover: cdh(twc.green[600], 0.1),
|
|
|
+ successColorPressed: cdh(twc.green[600], 0.2),
|
|
|
+ successColorSuppl: twc.green[600],
|
|
|
+ warningColor: twc.orange[600],
|
|
|
+ warningColorHover: cdh(twc.orange[600], 0.1),
|
|
|
+ warningColorPressed: cdh(twc.orange[600], 0.2),
|
|
|
+ warningColorSuppl: twc.orange[600],
|
|
|
+ errorColor: twc.red[600],
|
|
|
+ errorColorHover: cdh(twc.red[600], 0.1),
|
|
|
+ errorColorPressed: cdh(twc.red[600], 0.2),
|
|
|
+ errorColorSuppl: twc.red[600],
|
|
|
},
|
|
|
Alert: {
|
|
|
...closeIconColor(primaryColor),
|
|
|
},
|
|
|
Button: {
|
|
|
- textColorSuccess: twc.lime[50],
|
|
|
-
|
|
|
- textColorInfo: twc.sky[50],
|
|
|
-
|
|
|
- textColorWarning: twc.amber[50],
|
|
|
-
|
|
|
- textColorError: twc.pink[50],
|
|
|
+ textColorSuccess: twc.green[50],
|
|
|
+ textColorInfo: twc.blue[50],
|
|
|
+ textColorWarning: twc.orange[50],
|
|
|
+ textColorError: twc.red[50],
|
|
|
},
|
|
|
Card: {
|
|
|
borderColor: DARK.borderColor,
|
|
|
},
|
|
|
Checkbox: {
|
|
|
common: {
|
|
|
- borderColor: twc.neutral[700],
|
|
|
+ borderColor: twc.blue[700],
|
|
|
},
|
|
|
},
|
|
|
DataTable: {
|
|
|
borderColor: DARK.borderColor,
|
|
|
- tdColor: twc.neutral[900],
|
|
|
- tdColorHover: cbh(twc.neutral[850], 0.06),
|
|
|
- thColor: twc.neutral[850],
|
|
|
+ tdColor: twc.blue[950], // 修改表格颜色为科技蓝
|
|
|
+ tdColorHover: cbh(twc.blue[900], 0.06),
|
|
|
+ thColor: twc.blue[900],
|
|
|
},
|
|
|
Divider: {
|
|
|
- color: cdh(twc.neutral[750], 0.24),
|
|
|
+ color: cdh(twc.blue[750], 0.24),
|
|
|
},
|
|
|
Drawer: {
|
|
|
- footerBorderTop: `1px solid ${twc.neutral[750]}`,
|
|
|
- headerBorderBottom: `1px solid ${twc.neutral[750]}`,
|
|
|
+ footerBorderTop: `1px solid ${twc.blue[750]}`,
|
|
|
+ headerBorderBottom: `1px solid ${twc.blue[750]}`,
|
|
|
peers: {
|
|
|
Scrollbar: {
|
|
|
- color: twc.neutral[750],
|
|
|
- colorHover: twc.neutral[700],
|
|
|
+ color: twc.blue[750],
|
|
|
+ colorHover: twc.blue[700],
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
Menu: {
|
|
|
- itemColorHover: twc.neutral[800],
|
|
|
+ itemColorHover: twc.blue[800],
|
|
|
},
|
|
|
Message: {
|
|
|
- textColorSuccess: twc.lime[500],
|
|
|
- textColorInfo: twc.sky[500],
|
|
|
- textColorWarning: twc.amber[500],
|
|
|
- textColorError: twc.pink[500],
|
|
|
+ textColorSuccess: twc.green[500],
|
|
|
+ textColorInfo: twc.blue[500],
|
|
|
+ textColorWarning: twc.orange[500],
|
|
|
+ textColorError: twc.red[500],
|
|
|
textColorLoading: primaryColor,
|
|
|
-
|
|
|
- colorSuccess: cmh(twc.neutral[750], twc.lime[950], 0.06),
|
|
|
- colorInfo: cmh(twc.neutral[750], twc.sky[950], 0.06),
|
|
|
- colorWarning: cmh(twc.neutral[750], twc.amber[950], 0.06),
|
|
|
- colorError: cmh(twc.neutral[750], twc.pink[950], 0.06),
|
|
|
- colorLoading: cmh(twc.neutral[750], primaryColor, 0.01),
|
|
|
-
|
|
|
+ colorSuccess: cmh(twc.blue[750], twc.green[950], 0.06),
|
|
|
+ colorInfo: cmh(twc.blue[750], twc.blue[950], 0.06),
|
|
|
+ colorWarning: cmh(twc.blue[750], twc.orange[950], 0.06),
|
|
|
+ colorError: cmh(twc.blue[750], twc.red[950], 0.06),
|
|
|
+ colorLoading: cmh(twc.blue[750], primaryColor, 0.01),
|
|
|
...closeIconColor(primaryColor),
|
|
|
},
|
|
|
Modal: {
|
|
|
peers: {
|
|
|
Scrollbar: {
|
|
|
- color: twc.neutral[800],
|
|
|
- colorHover: twc.neutral[750],
|
|
|
+ color: twc.blue[800],
|
|
|
+ colorHover: twc.blue[750],
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
Notification: {
|
|
|
peers: {
|
|
|
Scrollbar: {
|
|
|
- color: twc.neutral[750],
|
|
|
- colorHover: twc.neutral[700],
|
|
|
+ color: twc.blue[750],
|
|
|
+ colorHover: twc.blue[700],
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
Radio: {
|
|
|
common: {
|
|
|
- borderColor: twc.neutral[700],
|
|
|
+ borderColor: twc.blue[700],
|
|
|
},
|
|
|
},
|
|
|
Select: {
|
|
|
@@ -183,15 +161,15 @@ export function baseDarkThemeOverrides(primaryColor = ''): GlobalThemeOverrides
|
|
|
InternalSelectMenu: {
|
|
|
peers: {
|
|
|
Scrollbar: {
|
|
|
- color: twc.neutral[700],
|
|
|
- colorHover: twc.neutral[650],
|
|
|
+ color: twc.blue[700],
|
|
|
+ colorHover: twc.blue[650],
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
Upload: {
|
|
|
- draggerColor: twc.neutral[850],
|
|
|
+ draggerColor: twc.blue[850],
|
|
|
},
|
|
|
}
|
|
|
-}
|
|
|
+}
|