You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.6 KiB
57 lines
1.6 KiB
/**
|
|
* 数据可视化 / 分类系列色常量
|
|
*
|
|
* 统一图表(Chart.js)、流程图(mermaid)、分类标签等多色区分场景的颜色来源。
|
|
* 与 `styles/tokens.css` 的语义色(成功/警告/错误)互补:
|
|
* - 语义状态色 → 走 CSS 变量(`var(--color-success)` 等)
|
|
* - 多色区分的系列色 → 走本常量
|
|
*
|
|
* 每个系列色同时提供 hex 与 rgb 字符串(rgb 用于 `rgba(..., 0.1)` 填充背景)。
|
|
*/
|
|
|
|
export const palette = {
|
|
// ===== 系列色(数据可视化 / 分类) =====
|
|
blue: '#3b82f6',
|
|
blueRgb: '59, 130, 246',
|
|
purple: '#8b5cf6',
|
|
purpleRgb: '139, 92, 246',
|
|
green: '#10b981',
|
|
greenRgb: '16, 185, 129',
|
|
red: '#ef4444',
|
|
redRgb: '239, 68, 68',
|
|
orange: '#f59e0b',
|
|
orangeRgb: '245, 158, 11',
|
|
indigo: '#6366f1',
|
|
indigoRgb: '99, 102, 241',
|
|
pink: '#e83e8c',
|
|
pinkRgb: '232, 62, 140',
|
|
gray: '#6c757d',
|
|
grayRgb: '108, 117, 125',
|
|
|
|
// ===== 中性灰阶(流程图文本 / 边框 / 线条) =====
|
|
neutralText: '#1f2937',
|
|
neutralLine: '#6b7280',
|
|
neutralBorder: '#d1d5db',
|
|
} as const
|
|
|
|
/** 系列色浅色底(图表填充 / 流程图节点背景) */
|
|
export const paletteBg = {
|
|
blue: '#dbeafe',
|
|
green: '#d1fae5',
|
|
orange: '#fef3c7',
|
|
red: '#fee2e2',
|
|
indigo: '#e0e7ff',
|
|
pink: '#fce7f3',
|
|
gray: '#f3f4f6',
|
|
} as const
|
|
|
|
/** 系列色浅色描边(流程图节点边框,浅一档用于区分背景) */
|
|
export const paletteBorder = {
|
|
blue: '#3b82f6',
|
|
green: '#10b981',
|
|
orange: '#f59e0b',
|
|
red: '#ef4444',
|
|
indigo: '#a5b4fc',
|
|
pink: '#f9a8d4',
|
|
gray: '#d1d5db',
|
|
} as const
|