| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- /**
- * 品牌色板 — JS 侧单一事实源
- *
- * 说明:
- * - SCSS 变量编译期才解析,JS 块内无法引用 $var,因此在此处维护一份等值副本。
- * - 替换原则:仅替换 <script> 块内的纯 hex 字符串字面量(颜色字面量,如 '#F97316')。
- * - 不替换 canvas 绘图参数、动态拼接色、数据中携带的 hex(保持原始)。
- *
- * 对应 uni.scss §12-§16 令牌:
- * $brand-primary #F97316 → BrandColors.primary
- * $brand-primary-light #FB923C → BrandColors.primaryLight
- * $uni-primary-pale #FFF7ED → BrandColors.primaryPale
- * $dim-body #FF8C42 → BrandColors.body
- * $dim-mind #FF6B9D → BrandColors.mind
- * $dim-wisdom #6366F1 → BrandColors.wisdom
- * $dim-action #10B981 → BrandColors.action
- * $dim-wealth #F59E0B → BrandColors.wealth
- * $status-success #10B981 → BrandColors.success
- * $status-danger #EF4444 → BrandColors.danger
- * $status-warning #FBBF24 → BrandColors.warning
- * $facade-text-strong #333 → BrandColors.textStrong
- * $facade-text-body #666 → BrandColors.textBody
- * $facade-text-muted #999 → BrandColors.textMuted
- * $facade-fill-ghost #FAFAFA → BrandColors.fillGhost
- * $facade-fill-gray-50 #F9FAFB → BrandColors.fillGray50
- * $app-surface #FFFFFF → BrandColors.white
- * $status-danger-strong-2 #C62828 → BrandColors.dangerDeep
- */
- export const BrandColors = {
- // 品牌橙族
- primary: '#F97316',
- primaryLight: '#FB923C',
- primaryPale: '#FFF7ED',
- primaryDark: '#EA580C',
- primaryDeep: '#C2410C', // 深橙(画布卡片文字档)
- bodyLight: '#FFB366', // 身体维度亮档(画布渐变终)
- bodyTint: '#FFF8F0', // 身体维度浅底($dim-body-tint)
- // 五维身份色
- body: '#FF8C42',
- mind: '#FF6B9D',
- wisdom: '#6366F1',
- action: '#10B981',
- wealth: '#F59E0B',
- // 状态色
- success: '#10B981',
- successLight3: '#34D399', // emerald-400 成功亮档·三档
- warning: '#FBBF24',
- danger: '#EF4444',
- dangerLight2: '#FB7185', // rose-400 危险亮档·二档(睡眠质量条)
- info: '#0EA5E9', // sky-500 信息
- infoLight: '#38BDF8', // sky-400 信息亮档
- infoBlue: '#3B82F6', // blue-500 信息蓝(智慧维度组件色板)
- infoBlueLight: '#60A5FA', // blue-400 信息蓝亮档
- wisdomLight: '#818CF8', // indigo-400 智慧亮档
- // 中性灰阶
- white: '#FFFFFF',
- textStrong: '#333333',
- textBody: '#666666',
- textMuted: '#999999',
- fillGhost: '#FAFAFA',
- fillGray50: '#F9FAFB',
- // 状态深阶
- dangerDeep: '#C62828',
- violetDeep: '#7C3AED', // violet-600 深紫(#7C3AED)
- // 中性灰阶扩展(对应 $facade-text-gray-400 / $facade-text-slate / $facade-hairline-2)
- textGray400: '#9CA3AF',
- textSlate: '#6B7280',
- hairline2: '#EEE',
- textFaint: '#888',
- gray200: '#E5E7EB', // gray-200 浅灰(canvas 连线/分隔)
- textGray800: '#1F2937', // gray-800 深灰($facade-text-gray-800)
- appTextSubtle: '#94A3B8', // slate-400 弱文字($app-text-subtle)
- pink: '#EC4899', // pink-500($accent-pink)
- tealDeep: '#14B8A6', // teal-500(天盘 9 档色板)
- weatherSunny: '#FFB347', // 晴朗心情色(情绪趋势天气板)
- textGhost: '#CCC', // $facade-text-ghost
- hairline: '#E0E0E0', // $facade-hairline
- matOrange: '#FF9800', // $mat-orange-base
- matBlue: '#2196F3', // $mat-blue-base
- matRed: '#F44336', // Material red-500
- amber: '#FFC107', // Material amber-500
- mindAccent: '#FF6B35', // 心智维度强调橙($mind-accent)
- brownWarm: '#8D6E63', // 暖棕($brown-warm,关系图/横幅)
- infoSky: '#0EA5E9', // sky-500($uni-info;肠道菌群指标色)
- dangerStrong2: '#C62828', // red-800($status-danger-strong-2)
- fill: '#F0F0F0', // $facade-fill
- fillGray100: '#F3F4F6', // $facade-fill-gray-100
- goldDeep: '#FFA500', // $accent-gold-deep(数据图标橙)
- blush: '#FFF5F7', // 浅粉底(家庭看板画布)
- // Flat 设计主题(与 uni.scss $flat-* 同值;scss 侧见 uni.scss §Flat)
- flatTeal: '#4ECDC4',
- flatTealDeep: '#44B09E',
- flatGreen: '#A8E063',
- flatGreenDeep: '#56AB2F',
- flatWarm: '#FFF0E6',
- flatOrangeSoft: '#FFB088',
- flatBar: '#FFD93D',
- // Plutchik 八基本情绪色板(情绪打卡专属;单一事实源)
- emotionJoy: '#FFD93D', // 开心
- emotionTrust: '#6BCB77', // 信任
- emotionFear: '#9B59B6', // 恐惧
- emotionSurprise: '#FF9FF3', // 惊讶
- emotionSadness: '#6B9BD2', // 悲伤/难过
- emotionDisgust: '#A0A0A0', // 厌恶
- emotionAnger: '#FF6B6B', // 烦躁/愤怒
- // 语义别名(后端配置色兜底;SCSS 侧等值令牌见 uni.scss $facade-violet/$status-info)
- violet: '#8B5CF6', // violet-500 紫罗兰(心智维度组件色板)
- violetLight: '#A78BFA', // violet-400 紫罗兰浅档(渐变起)
- violetLighter: '#C084FC', // violet-400 更浅档(渐变起)
- gold: '#FFD700', // 亮金(智慧维度渐变起)
- orangeDeep: '#EA580C', // orange-600 橙深档(全家渐变终)
- matGreen: '#4CAF50', // Material green-500
- matGreenLight: '#81C784', // Material green-300
- infoBlue: '#3B82F6', // blue-500 信息蓝(智慧维度组件色板)
- // 通用语义别名(方便使用)
- brand: '#F97316',
- dimMind: '#FF6B9D',
- dimWisdom: '#6366F1',
- dimAction: '#10B981',
- dimBody: '#FF8C42',
- dimWealth: '#F59E0B',
- // Tailwind 中性色阶(组件脚本内散落色值收编:stone / slate / gray)
- stone900: '#1C1917',
- stone500: '#78716C',
- stone400: '#A8A29E',
- stone200: '#E7E5E4',
- stone100: '#F5F5F4',
- slate800: '#1E293B',
- slate600: '#475569',
- slate500: '#64748B',
- slate300: '#CBD5E1',
- slate200: '#E2E8F0',
- slateGhost: '#EEF2F7',
- gray700: '#4A5568',
- silver: '#C0C0C0',
- black: '#000000',
- textDeep: '#444444',
- // Tailwind 彩色档(琥珀 / 翠绿 / 青 / 靛 / 粉 / 橙)
- amber50: '#FFFBEB',
- emerald50: '#ECFDF5',
- cyan500: '#06B6D4',
- indigo600: '#4F46E5',
- indigo50: '#EEF2FF',
- indigoPeriwinkle: '#667EEA',
- pink600: '#DB2777',
- pink50: '#FDF2F8',
- orange300: '#FFB74D',
- // 浅底 tint(发现页圈层 / 分享海报 / 量表卡)
- tintPurpleSoft: '#F3E5F5',
- tintOrangeSoft: '#FFF3E0',
- tintGreenSoft: '#E8F5E9',
- tintPinkSoft: '#FCE4EC',
- mindTint: '#FFF0F5',
- // Element UI 语义色
- elementDanger: '#F56C6C',
- // 五维雷达图 grid/label 档(按维度成对;对应页面 RadarChart props)
- emerald100: '#D1FAE5', // 行动维度 网格
- emerald800: '#065F46', // 行动维度 标签
- orange200: '#FED7AA', // 身体维度 网格
- orange800: '#9A3412', // 身体维度 标签
- pink100: '#FCE7F3', // 心智维度 网格
- pink800: '#9D174D', // 心智维度 标签
- indigo100: '#E0E7FF', // 智慧维度 网格
- indigo800: '#3730A3', // 智慧维度 标签
- // 输入占位符(placeholder-style)
- textHint: '#BBBBBB',
- }
- // 向后兼容导出(避免 import 路径散乱)
- export default BrandColors
- // 行业类别色板(珍珠图/关系图专用;22 类,内环 10 + 外环 12)
- // 提取到此处避免页面内散落 hex,页面仅引用 INDUSTRY_COLORS.XXX
- export const INDUSTRY_COLORS = {
- // 内环(暖色系:红/橙/黄/棕)
- PUBLIC_SECURITY: '#DC2626', // 公安(red-600)
- AUTO: '#EA580C', // 汽车相关(orange-600)
- REAL_ESTATE: '#D97706', // 房产服务(amber-600)
- TICKETING: '#CA8A04', // 票务(yellow-600)
- HANDYMAN: '#B45309', // 多能工人(amber-700)
- APPLIANCE: '#92400E', // 家电(amber-800)
- CATERING: '#E11D48', // 餐饮(rose-600)
- FOOD: '#BE123C', // 食品(rose-700)
- LEGAL: '#B91C1C', // 法律(red-700)
- WEEKEND_EXPERT: '#FB7185', // 周末达人(rose-400)
- // 外环(紫/蓝/青/绿)
- GOVERNMENT: '#8B5CF6', // 政府综合(violet-500)
- TAX: '#7C3AED', // 税务(violet-600)
- BUSINESS_ADMIN: '#6D28D9', // 工商(violet-700)
- BANK: '#2563EB', // 银行(blue-600)
- MEDIA: '#1D4ED8', // 媒体(blue-700)
- TRAVEL: '#0EA5E9', // 旅游(sky-500)
- LEADING_ENTERPRISE: '#0891B2', // 领军企业(cyan-600)
- INDUSTRY_BENCHMARK: '#059669', // 行业标杆(emerald-600)
- UNIVERSITY: '#16A34A', // 高校(green-600)
- FINANCE: '#84CC16', // 金融(lime-500)
- SENIOR_LOCAL: '#65A30D', // 资深土著(lime-600)
- KEY_CITY: '#4D7C0F', // 北上广等(lime-700)
- }
- // 具名快捷导出(历史写法:页面按名引入,如 import { body, primary } from ...;与 BrandColors.xxx 等价)
- export const primaryPale = BrandColors.primaryPale
- export const body = BrandColors.body
- export const primary = BrandColors.primary
- export const success = BrandColors.success
- export const white = BrandColors.white
- export const wisdom = BrandColors.wisdom
- export const danger = BrandColors.danger
|