| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- import type { ThemeConfig } from "./ThemeDefine";
- /** 默认主题配置 */
- export const DefaultTheme : ThemeConfig = {
- varOverrides: {
- spaceSize: {
- xs: '10rpx',
- sm: '15rpx',
- md: '20rpx',
- lg: '30rpx',
- },
- fontSize: {
- mini: 22,
- small: 26,
- medium: 30,
- large: 38,
- larger: 46,
- },
- shadow: {
- default: '0 0 10rpx rgba(0, 0, 0, 0.1)',
- light: '0 0 10rpx rgba(0, 0, 0, 0.05)',
- dark: '0 0 10rpx rgba(0, 0, 0, 0.2)',
- },
- },
- colorConfigs: {
- default: {
- default: 'transparent',
- button: '#dddddd',
- lightButton: '#ffffff',
- primary: '#007AFF',
- secondary: '#0462C7',
- success: '#4CAF50',
- info: '#2196F3',
- warning: '#FFC107',
- danger: '#F44336',
- notice: '#ffffff',
- light: '#F5F5F5',
- dark: '#212121',
- white: '#FFFFFF',
- black: '#000000',
- grey: '#999999',
- lightGrey: '#c3c3c3',
- darkGrey: '#8e8e8e',
- skeleton: 'rgba(46,50,56, 0.05)',
- },
- pressed: {
- default: 'rgba(0,0,0,0.35)',
- white: '#e7e7e7',
- black: '#666666',
- grey: '#aaaaaa',
- primary: '#0960ac',
- success: '#278950',
- warning: '#dd8700',
- info: '#0960ac',
- notice: '#dddddd',
- danger: '#d70920',
- },
- mask: {
- default: 'rgba(0, 0, 0, 0.3)',
- white: 'rgba(250, 250, 250, 0.8)',
- primary: 'rgba(9, 96, 172, 0.2)',
- info: 'rgba(33, 150, 243, 0.2)',
- success: 'rgba(39, 137, 80, 0.3)',
- warning: 'rgba(221, 135, 0, 0.2)',
- danger: 'rgba(215, 9, 32, 0.2)',
- },
- background: {
- page: '#f8f8f8',
- primary: '#eff2ff',
- success: '#e0f6de',
- warning: '#FEECD2',
- danger: '#fff0f0',
- info: '#eff2ff',
- imageBox: '#dfdfdf',
- cell: '#ffffff',
- bar: '#f8f8f8',
- box: '#dadada',
- switch: '#dadada',
- notify: '#f8f8f8',
- toast: 'rgba(0, 0, 0, 0.85)',
- mask: 'rgba(0, 0, 0, 0.6)',
- },
- text: {
- title: '#000000',
- light: '#ffffff',
- content: '#333333',
- second: '#999999',
- link: '#007AFF',
- info: '#007AFF',
- primary: '#014D8E',
- success: '#2EA200',
- warning: '#D87001',
- danger: '#BE0405',
- },
- border: {
- input: '#dadada',
- default: '#dddddd',
- cell: '#efefef',
- light: '#eeeeee',
- },
- },
- textConfigs: {
- h1: {
- color: 'text.title',
- fontSize: '50px',
- fontWeight: 'bold',
- },
- h2: {
- color: 'text.title',
- fontSize: '45rpx',
- fontWeight: 'bold',
- },
- h3: {
- color: 'text.title',
- fontSize: '40rpx',
- fontWeight: 'bold',
- },
- h4: {
- color: 'text.title',
- fontSize: '36rpx',
- fontWeight: 'bold',
- },
- h5: {
- color: 'text.title',
- fontSize: '30rpx',
- fontWeight: 'bold',
- },
- h6: {
- color: 'text.title',
- fontSize: '26rpx',
- fontWeight: 'bold',
- },
- content: {
- color: 'text.content',
- fontSize: '24rpx',
- },
- subText: {
- color: 'text.content',
- fontSize: '26rpx',
- },
- footerText: {
- color: 'text.second',
- fontSize: '24rpx',
- },
- }
- }
- /** 默认暗黑主题配置 */
- export const DefaultDarkTheme = {
- ...DefaultTheme,
- colorConfigs: {
- ...DefaultTheme.colorConfigs,
- default: {
- ...DefaultTheme.colorConfigs.default,
- button: '#666666',
- lightButton: '#333333',
- notice: '#000000',
- light: '#3e3e3e',
- dark: '#eeeeee',
- white: '#000000',
- black: '#ffffff',
- grey: '#666666',
- lightGrey: '#3d3d3d',
- darkGrey: '#727272',
- skeleton: 'rgba(255,255,255,0.1)',
- },
- pressed: {
- ...DefaultTheme.colorConfigs.pressed,
- default: 'rgba(255,255,255,0.1)',
- white: '#181818',
- black: '#999999',
- grey: '#555555',
- notice: '#222222',
- },
- mask: {
- ...DefaultTheme.colorConfigs.mask,
- default: 'rgba(0, 0, 0, 0.5)',
- white: 'rgba(250, 250, 250, 0.9)',
- primary: 'rgba(9, 96, 172, 0.3)',
- info: 'rgba(33, 150, 243, 0.3)',
- success: 'rgba(39, 137, 80, 0.4)',
- warning: 'rgba(221, 135, 0, 0.3)',
- danger: 'rgba(215, 9, 32, 0.3)',
- },
- background: {
- ...DefaultTheme.colorConfigs.background,
- page: '#1a1a1a',
- imageBox: '#202020',
- cell: '#000000',
- bar: '#1a1a1a',
- box: '#252525',
- switch: '#252525',
- notify: '#1a1a1a',
- toast: 'rgba(0, 0, 0, 0.95)',
- mask: 'rgba(0, 0, 0, 0.8)',
- primary: 'rgba(0, 122, 255, 0.2)',
- success: 'rgba(76, 175, 80, 0.2)',
- warning: 'rgba(255, 193, 7, 0.2)',
- danger: 'rgba(244, 67, 54, 0.2)',
- info: 'rgba(33, 150, 243, 0.2)',
- },
- text: {
- ...DefaultTheme.colorConfigs.text,
- title: '#ffffff',
- light: '#000000',
- content: '#cccccc',
- second: '#666666',
- },
- border: {
- ...DefaultTheme.colorConfigs.border,
- input: '#252525',
- default: '#333333',
- cell: '#333333',
- light: '#444444',
- },
- },
- }
|