鎏金疾行(Gilded Velocity)— wanman /app 重设计方案


方案名与主张

方案名:鎏金疾行(Gilded Velocity)。

一句话主张:把整个 /app 铺成一张暖灰的作业台,只用一种颜色 —— 金 —— 去标记「正在前进的事」。

三条数字锚点(这就是全案的全部"设计",其余都是它的推论):

  1. 唯一有色相的角色是金:--brand = 浅色 #856314(深色 #e3c46a)。全仓 bg-brand 158 处、text-brand 173 处、brand-soft 86 处、brand-ink 53 处(含 text-primary 19 处)全部汇集到这一个色相。金的含义被严格限定为三件事:当前所在的空间(railPillBase / railItemActive,chrome.ts:47-50)、我自己发出的消息(--message-self,message-bubble.tsx:5-6 把 --primary 作用域重映射)、正在前进的任务状态(toneChipClasses.brand = bg-brand-soft text-brand-ink,tone.ts:14)。其余一切表面无彩。
  2. 层级不用阴影,用暖灰面差:画布 --surface-rail #e6e2d7 + --workspace-background 渐变,面板 --background #fbfaf6,两者实测 1.24:1(现状 #e1e8f2 vs #fcfcfc = 1.20:1,且是蓝灰)。这是三栏(imListAside 与 <main> 都是 bg-background,靠 md:mx-1 的 4px 缝分隔)唯一可用的令牌级层级手段。
  3. 收紧一档圆角:--radius 由 0.625rem → 0.5rem,一处令牌把实测散落的 12 档圆角(2/6/7/8/10/12/14/18/24/26/32px)收成 8 / 11.2 / 14.4 / 20.8 四档,对应参考的「控件 8 / 卡面 16 / 药丸 999」。

明确不做的事:不新增组件、不加动画、不改字体栈、不改字号(原因见 §5)、不引入第二种强调色、不对卡片加阴影层。


参考提炼

Superhuman 的设计语言(golden hour editorial dashboard)里有 5 条与 B 端协作工具同构的规则,逐条给出原文依据与迁移动作;第 6 条是"看起来很像但不能搬"的边界。

# 参考规则(原文/要点) 迁移到 wanman 的动作 落点
R1 "Warm Parchment #f2f0eb — Page canvas — the dominant surface";"Do not place white surfaces directly on white" 画布与面板分两层:画布 = --surface-rail #e6e2d7(比参考的 parchment 再暗半档,因为要承载三栏缝隙),面板 = --background #fbfaf6(暖纸白),纯白 --card/--popover #ffffff 只留给"需要抬起的弹层/卡面" ①(--surface-rail/--workspace-background/--background/--card)
R2 "Use #421d24 as the single primary action fill; do not introduce a second chromatic button color" 唯一有色填充 = 金:--brand + --brand-foreground(#fffdf5,实测 5.44:1)。破坏性操作用 --destructive #b23a28(暖砖红,对白 5.95:1)—— 它不是"第二个品牌色",而是危险语义,且已由 shadcn 的 destructive variant 独占 ① + ②(Button variant="destructive")
R3 "Do not add drop shadows to cards — depth comes from layering, not elevation stacks" + "Hairline borders (#e3e3e2)" 卡面层级靠面差 + 1px 发丝线(--border #e3ded0,冷灰 → 暖灰)。现有 shadow-e1..e3/shadow-pop 位于 @theme inline(1–106 行),属本方案不改动面;只在 §9 记账「卡面阴影可下一轮降一档」 ①(--border),阴影仅记录
R4 "Reserve #714cb6 exclusively for inline links — never use violet as a button fill, badge, or icon stroke"(角色分工:链接色 ≠ 填充色 ≠ 徽标色) 反向采用"角色合并 + 含义收窄":本产品里"可点的金色动作"出现频率高(headerTextAction、formSubmitButtonClass、link variant),拆两个色号会在 15px 中文界面里造成两套强调语义。故金同时承担填充与文字,代价与补偿写在 §10 ①
R5 "Use weight 460 for headlines 28px and above / keep letter-spacing tight on display sizes" 中文可变字重不可用,等价做法 = 大字只减字距(letter-spacing:-0.01em)与正文 15px/1.375 不动;该条落在组件层,本方案只在 §5 记为未落地项 组件层(超范围,已标注)
— 不搬:hero 摄影、64px/49px 展示字号、浮玻璃卡、maroon #421d24、violet #714cb6、#f2f0eb 直接当 --background 见 §3 —

适配判断

为什么适合 wanman

舍弃项(参考里有、但不搬)

参考特征 不搬的理由 本方案替代
摄影/hero 大图、login-orb-* 之外的玻璃质感 营销语汇;产品页是信息密度场 保留既有 login-glass-card(styles.css:1149),只换 --brand 让其光晕变金(§6-S7)
64px / 49px 展示字、0.76–0.96 行高 中文正文已定为 15px/1.375(@layer base),且字号改动会波及 252 个组件文件 不改字号(§5)
maroon #421d24、violet #714cb6 参考品牌色;搬来会与 wanman 的金色主张冲突 只借"单一强调色 + 无彩中性面"的结构,不借色号
#f2f0eb 直接作为 --background 该值与本方案的面板色只差 1.04:1,且我们要把"画布/面板"分成两层 画布 #e6e2d7、面板 #fbfaf6、卡面 #ffffff 三层
"no shadows" 的严格版本 shadcn base-nova 的 shadow-e1..e3/pop 已在 30+ 处使用,弹层需要表达高度 保留阴影;把层级主要交给面差,§9 记一条"降一档"的后续项
4px 基准间距 + 64–96px 段落间距 企业工具行高 34px(channelRowBase)、卡间距 12px(gap-3,workspaceCatalogGrid) 保持现有密度,只调面与色

令牌映射

只改 web/src/styles.css 里已存在的令牌名,不新增、不改名、不改 @theme inline 的映射(tokens.css 里那段是原文照录)。唯一允许的"新增行"是 .dark 中补 --interactive / --channel-icon 两个已存在于 :root 的令牌名(当前深色下回落成浅色值)。

浅色 :root(36 项)

令牌 现状(styles.css:108-160) 建议值 意图与实测依据
--background #fcfcfc #fbfaf6 面板底(侧栏/主区/dialog)。与画布 1.24:1
--foreground #060607 #26241e 暖近黑墨(对齐参考 Ink Charcoal #292827 的暖度)。对面板 14.86:1
--card #ffffff #ffffff 保持:只有需要抬起的表面用纯白(R1)
--card-foreground #060607 #26241e 随 --foreground 收口
--popover #ffffff #ffffff 保持
--popover-foreground #060607 #26241e 随 --foreground 收口
--message-self #e8f3fe #faf0d3 自己气泡 = 香槟金(参考 Lilac Mist 的"次表面"角色)。对面板 1.09:1,靠色相差与 --accent 区分
--message-self-foreground #0d274a #33280a 气泡内文字。对 #faf0d3 12.75:1
--primary var(--brand) 保持 只想改值,不换接线
--primary-foreground var(--brand-foreground) 保持 同上
--secondary #ebedef #eae6d9 搜索框底(imSearchField = bg-secondary/75,chrome.ts:70)、次级按钮。对面板 1.20:1
--secondary-foreground #060607 #26241e —
--muted #f2f3f5 #eeeadf 悬停底、TabsList 底、任务状态 chip 底(toneChipClasses.slate, tone.ts:46)。对面板 1.15:1
--muted-foreground #5c5e66 #6a655c 次级字/时间戳。对面板 5.54:1,对 --muted 4.81:1,压在搜索框实测底 #eeebe0 上 4.85:1
--accent #ebedef #e8e4d6 他人消息气泡 / 行悬停。对面板 1.22:1,其上正文 12.19:1
--accent-foreground #060607 #26241e —
--destructive #da373c #b23a28 暖砖红,与金同温。对白 5.95:1(未读点白字同此底)
--border #dcdee1 #e3ded0 暖发丝线。对白 1.34:1(现状 1.35:1)—— 装饰性分隔线,见 §8 风险 R3
--input #dcdee1 #96907c 控件边界色(shadcn Input 默认 border-input)。对白 3.19:1、对面板 3.06:1,满足 1.4.11 的 3:1
--ring var(--brand) 保持 焦点环 = 金,对白 5.54:1
--chart-1..5 oklch(0.87/0.556/0.439/0.371/0.269 0 0) #8a6a12 / #b5891f / #6f6a5e / #8f8a7e / #2e2b25 灰阶 → 金/墨单色阶:对面板 4.84 / 3.06 / 5.16 / 3.29 / 13.51(现状是纯灰阶,与品牌无关联)
--radius 0.625rem 0.5rem 一处收敛 12 档圆角:rounded-lg 8px、xl 11.2px、2xl 14.4px、4xl 20.8px(胶囊)
--brand #2563eb #856314 深金。浅色下文字量最大(text-brand 173 处),亮金在 #fbfaf6 上只有 ~2.9:1,故必须取深金:对白 5.54:1、对面板 5.30:1、对画布 5.30:1
--brand-foreground #ffffff #fffdf5 金底上的近白暖白。对 #856314 5.44:1(Button default / formSubmitButtonClass)
--brand-soft rgb(37 99 235 / 0.12) rgb(176 138 20 / 0.14) 金雾:选中底、headerTextAction hover、composerToolbarBtnActive。合成后白卡上 #f4efde,其上的 --brand-ink 6.38:1
--brand-ink #1d4ed8 #6d5209 金版墨色文字(selectedRow = text-brand-ink)。对选中底 #f5edd4 6.27:1,对面板 7.03:1
--surface-chat-soft #e8f2ff #f7f0dd 引用/回复浅底。对面板 1.09:1,其上 --muted-foreground 5.09:1
--surface-chat-selected #e5ecfc #f5edd4 会话/频道选中底(selectedRow)。对面板 1.12:1
--mention #3370ff #856314 与 --brand 同值:收掉实测的"三种蓝并存"(#2563eb / #006ce7 / #3370ff),@提及对香槟气泡 4.87:1
--ink #060607 #26241e 与 --foreground 同值,避免出现第二种黑
--surface-rail #e1e8f2 #e6e2d7 画布/空间轨的暖高级灰(蓝灰 → 暖灰)。这是 R1 的落地锚点
--workspace-background linear-gradient(180deg, #e1e8f2, #e1e5f1) linear-gradient(180deg, var(--surface-rail), #eceae1) 渐变两端改用 --surface-rail/暖灰,与面板形成 1.24:1
--workspace-rail-background transparent 保持 轨不上色,露出 .workspace-shell 画布
--workspace-header-background var(--background) 保持 顶栏与面板同底,只有 1px 分割线
--interactive #4e5058 #57534a 列表图标/标签字(text-interactive 7 处、toneXxxClasses.slate)。对面板 7.33:1,对 --muted 6.37:1
--channel-icon #80848e #857f73 频道图标(placeholder:text-channel-icon 19 处)。对画布 3.07:1、对面板 3.93:1(图标 3:1 达标)
--sidebar #fcfcfc #fbfaf6 全仓 bg-sidebar* 引用数 = 0(死令牌,见 §6-S1);取值与 --background 对齐,防未来启用时出现第三种白
--sidebar-foreground #060607 #26241e 同上
--sidebar-accent #ebedef #eeeadf 对齐 --muted
--sidebar-accent-foreground #060607 #26241e 同上
--sidebar-border #dcdee1 #e3ded0 对齐 --border
--sidebar-primary / --sidebar-primary-foreground / --sidebar-ring var(--brand) / var(--brand-foreground) / var(--ring) 保持 间接引用,随金自动变化

深色 .dark(含 2 行补齐)

令牌 现状(styles.css:162-205) 建议值 意图与实测依据
--surface-rail #e3e5e8 #0a0907 修复真实缺陷:现状是浅色值,深色下是一条亮竖带(对 #0a0a0a 15.69:1)。新值对 #141310 1.15:1,构成"凹"的最外层
--workspace-background radial-gradient(ellipse at 8% 0%, color-mix(in oklab, var(--brand) 10%, var(--muted)), var(--muted) 64%) 同结构,金比例 10% → 8% 暗底金发光更抢眼,压一档防画布泛黄
--workspace-rail-background color-mix(in oklab, var(--background) 45%, transparent) 保持 —
--workspace-header-background linear-gradient(180deg, color-mix(in oklab, var(--background), var(--brand) 3%), var(--background)) 同结构,3% → 4% 顶栏带一丝金气,与浅色顶栏"纯面板色"形成对照
--background oklch(0.145 0 0)(≈#0a0a0a 中性黑) #141310 暖墨。对 --foreground 16.17:1;与 --card 1.11:1
--foreground oklch(0.985 0 0)(≈#fafafa) #f2efe7 暖白。对画布 16.17:1、对 --card 14.50:1、对 --accent 13.13:1
--ink oklch(0.16 0.02 258)(冷蓝黑) #f2efe7 与 --foreground 同值;冷蓝黑是深色下唯一的非暖墨
--card oklch(0.205 0 0)(≈#171717) #201e18 抬起面。对画布 1.11:1(靠 1px 线 + 阴影定边)
--card-foreground oklch(0.985 0 0) #f2efe7 —
--popover oklch(0.205 0 0) #24221c 比 --card 再抬一档(浮层)
--popover-foreground oklch(0.985 0 0) #f2efe7 —
--secondary oklch(0.269 0 0)(≈#262626) #26241d 暖黑填充。对正文 13.51:1
--secondary-foreground oklch(0.985 0 0) #f2efe7 —
--muted oklch(0.269 0 0) #26241d 同 --secondary(现状两者同值,保持一致)
--muted-foreground oklch(0.708 0 0)(≈#a3a3a3) #a9a49a 暖灰。对画布 7.49:1、对 --card 6.72:1、对 --muted 6.26:1
--accent oklch(0.269 0 0) #292620 他人气泡/悬停
--accent-foreground oklch(0.985 0 0) #f2efe7 —
--destructive oklch(0.704 0.191 22.216)(≈#ff6467 冷红) #ec6a52 暖珊瑚红。对 --card 5.36:1
--border oklch(1 0 0 / 10%)(白 10% 合成在 #0a0a0a 上 ≈#222222) #302c24 改为实色暖黑线:不再随 --background 漂移;对 --card 1.20:1、对画布 1.42:1(装饰性,R3)
--input oklch(1 0 0 / 15%)(合成 ≈#3a3a3a,对 #171717 仅 1.58:1) #736c5c 控件边界:对 --card 3.20:1,满足 1.4.11
--chart-1..5 同浅色灰阶 #e3c46a / #b5891f / #8f8a7e / #6f6a5e / #e8e4da 暗底金/墨阶,与浅色阶反向(深色下亮=主数据):对 --card 9.82 / 5.21 / 4.84 / 3.09 / 13.12
--brand oklch(0.68 0.15 256)(蓝) #e3c46a 亮金:暗底唯一的发光体。对画布 10.94:1、对 --card 9.82:1、对 --accent 8.88:1
--brand-foreground oklch(0.16 0.02 258) #1c160a 深金墨。对亮金底 10.59:1
--brand-soft oklch(0.28 0.05 256) rgb(227 196 106 / 0.16) 金雾;压在 --card 上 #3f3925,其上的 --brand-ink 8.52:1
--brand-ink oklch(0.84 0.09 256) #f0dcac 浅金墨(selectedRow)。对选中底 #2f2914 8.54:1、对金雾底 #3f3925 11.02:1
--primary / --primary-foreground var(--brand) / var(--brand-foreground) 保持 —
--ring var(--brand) 保持 亮金焦点环,对画布 10.94:1
--message-self #203b59 #2b2412 暗金气泡:深色下"我发的消息"仍是金色通道。对画布 1.21:1
--message-self-foreground #e7f3ff #f6ecd2 气泡内文字 13.09:1
--surface-chat-soft oklch(0.32 0.06 250) #332c17 引用块暗金浅底
--surface-chat-selected oklch(0.28 0.04 250) #2f2914 选中行底;其上 --brand-ink 8.54:1
--mention oklch(0.72 0.14 254) #e3c46a 与 --brand 同值
--interactive (未定义,回落 :root)#4e5058 #b6b1a7 补齐 R4:原回落值对 #141310 仅 2.46:1(不达 3:1);新值 8.70:1、对 --muted 7.27:1
--channel-icon (未定义,回落 :root)#80848e #8f8a7c 补齐:原值为冷灰(对 --card 4.84:1),与暖色画布色相冲突;新值对画布 5.39:1
--sidebar oklch(0.205 0 0) #1a1813 与 --card 同族、略深一档
--sidebar-foreground oklch(0.985 0 0) #f2efe7 —
--sidebar-accent oklch(0.269 0 0) #282419 —
--sidebar-accent-foreground oklch(0.985 0 0) #f2efe7 —
--sidebar-border oklch(1 0 0 / 10%) #322e26 —

字体与排版

字体栈:一字不改。 令牌层只有 --font-sans/--font-mono 两个旋钮,而它们位于 @theme inline(styles.css:33-41),本方案对该段照录不动。原栈已满足硬约束:"Geist Variable", "gg sans", "Noto Sans SC", "PingFang SC", ui-sans-serif, system-ui, "Segoe UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif —— 拉丁由 Geist 领衔、中文回退链完整(Noto Sans SC → PingFang SC → Microsoft YaHei),因此不会出现"拉丁字体没有中文字形导致混排掉档";--font-mono 同样保留。

可改的只有"颜色在这些字号下的可读性",本方案对每一个字号档位都给了实测比值(§7),已核对的最小档位是 11px(agent-citation-badge.tsx:60 的 text-[10px] 也走 --muted-foreground,对面板 5.54:1,达标)。

字号阶梯(现状,本方案不改,仅记录落点与超范围风险):

角色 现状字号/行高/字重 来源(文件:行) 本方案动作
正文/消息 15px / 1.375 / 400 @layer base 的 body(styles.css) 不动(符合简报 §2 的 15px 正文要求)
频道/会话行 15px,行高 34px chrome.ts channelRowBase 不动(③ 容器尺寸由既有类决定)
会话名/列表名 14px / 20px / 500 chrome.ts workspaceListNameText 不动
工作区标题 16px / 600 chrome.ts workspaceTitleText 不动
次级/时间戳 12–13px ui/message.tsx:63,76(text-xs)、chrome.ts workspaceDetailText 不动;颜色改 --muted-foreground(①)
标签/Badge 12px / 500 ui/badge.tsx(h-5 rounded-4xl text-xs) 半径随 --radius 由 26px → 20.8px(①,胶囊仍成立)
面板标题 14px / 600,52px 高 chrome.ts workspacePanelHeader(h-[3.25rem]) 不动
登录主标题 26px / 700 auth/login-code-form.tsx:262(text-2xl sm:text-[26px]) 不动(参考 R5 的"大字减字距"属组件层,未落地)
数字 12px mono + tabular-nums chrome.ts workspaceTimeText、unreadBadge 不动

超范围风险(明确记账,不在本方案内):实测存在 9 / 9.375 / 11 / 11.25 / 12 / 12.8 / 13.125 / 14 / 15 / 26px 共 10 档字号,且同一行内会混用(例:ui/message.tsx 用 text-sm 14px 而正文是 15px)。字号归一到「12 / 13 / 15 / 16 / 20 / 26」需要改组件类名,属于途径②③之外的组件层工作,本方案不做。


关键界面改造

覆盖样例面 7 个:S1 外壳/侧栏、S2 频道消息流、S3 任务大厅+任务卡、S4 AI 助手、S5 管理设置弹窗、S7 登录页、S8 应用中心;S6 语音频道单独说明(本栈不可见)。每条改造都标注 ①/②/③。

S1 外壳与侧栏

现状(实测):imListAside = relative flex h-full w-full flex-col bg-background(chrome.ts:55)与主区 <main> = chat relative flex min-w-0 flex-1 flex-col bg-background(app-shell.tsx:12273-12278)同为 bg-background → 侧栏与页面底色实测 1.00:1(零层级对比),分隔只靠 md:mx-1 的 4px 缝;画布 --workspace-background 是蓝灰渐变 #e1e8f2 → #e1e5f1(styles.css:145);空间轨 72px(railWidthClass = w-[72px])、轨项 bg-background/85 text-interactive ring-1 ring-foreground/5、选中项 rounded-xl bg-brand text-brand-foreground shadow-[0_4px_12px_-3px_var(--brand)]、金柱 railPillBase = bg-brand(chrome.ts:47-52);面板头 52px + workspace-header-surface;1px 分隔线 panelDivider = bg-border/45(chrome.ts:14)。

改造:

  1. ① 画布下沉:--surface-rail #e6e2d7、--workspace-background = linear-gradient(180deg, var(--surface-rail), #eceae1),面板保持 --background #fbfaf6 → 面差 1.24:1(原 1.20:1,且蓝灰→暖灰)。4px 缝因此第一次"看得见",三栏结构不靠阴影立住(R1)。深色侧同样成立:--surface-rail #0a0907(修掉现状浅色 #e3e5e8 亮竖带)对 --background #141310 = 1.15:1,方向为"画布凹、面板凸"。
  2. ① 轨 = 金的第一个语义位:railItemActive(bg-brand text-brand-foreground)实测 5.44:1;railPillBase 金柱与 --ring 同值,全屏唯一饱和色出现在"当前空间"。
  3. ① 会话行状态色:selectedRow = bg-surface-chat-selected text-brand-ink → #f5edd4 + #6d5209 = 6.27:1(深色 #2f2914 + #f0dcac = 8.54:1);未读 unreadBadge = bg-destructive text-white → #b23a28 白字 5.95:1(深色 #ec6a52);行悬停 hover:bg-foreground/[0.04] 由 --foreground 派生,自动变暖。
  4. ① 搜索框:imSearchField = bg-secondary/75 → 合成底 #eeebe0,其内 --muted-foreground 4.85:1,focus-within:border-brand/55 聚焦时描边转金。
  5. ③ 不动宽度:轨 72px、侧栏 w-64(256px)、面板头 52px、行高 34px 全部保留 —— 现有密度是飞书式信息密度的产物,改了会连带影响 252 个文件的排版假设。

S2 频道消息流

现状:频道头 workspacePanelHeader(52px)+ panelDivider(bg-border/45);他人气泡走 Bubble variant="secondary"(ui/bubble.tsx:22-35,内容 rounded-xl px-3 py-2 text-sm,bubble.tsx:74);自己的气泡由 message-bubble.tsx:5-6 把 --primary/--primary-foreground 作用域重映射为 --message-self/--message-self-foreground;实测量得他人气泡 = rgb(235,237,239)(--accent)、自己 = #e8f3fe(冷蓝);--mention #3370ff 与 --brand #2563eb 是两种蓝。

改造:

  1. ① "我发的 = 金":--message-self #faf0d3(香槟金)+ --message-self-foreground #33280a = 12.75:1;他人气泡 --accent #e8e4d6(暖灰,对面板 1.22:1,其上正文 12.19:1)。这是本方案最强的"扫读锚点":一屏里只有自己说过的话是金色。
  2. ① @提及收成一个色:--mention 取 #856314 与 --brand 同值 → 对香槟气泡 4.87:1,对面板 5.30:1;三种蓝只剩一种金。
  3. ① 引用/回复块:--surface-chat-soft #f7f0dd(对面板 1.09:1),其内 --muted-foreground 5.09:1。
  4. ① 圆角:气泡 rounded-xl 由 14px → 11.2px(--radius 0.625→0.5rem),与轨道项(rounded-xl)统一到同一档;--radius 是唯一改动点。
  5. ② 消息悬停动作:现状是自绘 composerToolbarBtn(inline-flex size-7 ... text-muted-foreground/80)。建议改用官方 Button variant="ghost" size="icon-sm"(h-7/size-7 与 size-7 完全对齐,见 ui/button.tsx size 枚举 icon-sm),由官方 ghost 的 hover:bg-muted 承接 --muted 的暖色值。此项为建议,不在令牌改动面内。
  6. ③ 不做:气泡 max-w-[80%](bubble.tsx:18)与正文 max-w-[72ch](message-list.tsx:3950)保留 —— 行宽实测已合理,改动会影响摘录/引用布局。

S3 任务大厅 + 任务卡

现状:卡面 rounded-2xl border-l-[3px] bg-white(task-hall.tsx:1215,圆角 18px、硬编码 bg-white);状态 chip = toneChipClasses.slate = border-border bg-muted text-interactive(task-hall.tsx:183/1243/1260,tone.ts:46);分类脊线 = toneBorderClasses[task.categoryTone](task-hall.tsx:1216,slate → border-l-slate-400 原始调色板);提醒条 border-amber-200 bg-amber-50 text-amber-800(task-hall.tsx:181/373/902/1272、app-center.tsx:582/961);标记徽标 flagBadge("urgent") = {label:"即将截止", tone:"rose"}、flagBadge("hot") = {label:"热门", tone:"amber"}(lib/task-hall-view.ts:144-145);状态文案 workItemStatusLabels = 待补充/待处理/进行中/待验证/已关闭(lib/task-board-status.ts:5-10);空态 rounded-2xl border border-border bg-white px-6 py-12(task-hall.tsx:537/547);"接单"按钮 border-amber-300 bg-white text-amber-800(task-hall.tsx:382);网格 workspaceCatalogGrid = grid gap-3 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4(chrome.ts:119-120)。

改造:

  1. ① 卡面与空态:bg-white 之外的层级全部由令牌给 —— 卡面 --card #ffffff 于面板 #fbfaf6 上 1.04:1,靠 inset 0 0 0 1px --foreground/7% 与 shadow-e2 定边(硬编码 bg-white 在深色下不翻转,见 §8 风险 R2)。
  2. ① 圆角归一:rounded-2xl 由 18px → 14.4px,与 space-manage-dialog 的 rounded-2xl(space-manage-dialog.tsx:183)统一;实测卡片圆角曾出现 10/12/14/18 四值并存。
  3. ① 状态 chip(覆盖 5 个工作流状态):chip 走 --muted #eeeadf + --interactive #57534a = 7.33:1(深色 #26241d + #b6b1a7 = 7.27:1)。
  4. ② 状态编码改官方 variant,且只留三档语义(推荐映射,落在组件层):
状态/标记 现状 建议(官方 Badge variant,②) 理由
进行中 toneChipClasses.slate Badge variant="default"(金底金墨 5.44:1) "正在前进的事" = 金,与 §1 主张一致
待补充 / 待处理 toneChipClasses.slate Badge variant="secondary" 无彩,等待态不争注意力
待验证 toneChipClasses.slate Badge variant="outline" 有形状无填充,表示"待确认"
已关闭 toneChipClasses.slate Badge variant="ghost" 最低视觉权重
即将截止 rose 原始色 Badge variant="destructive"(#b23a28/白 5.95:1) 时间压力属危险语义,官方已有 variant
热门 amber 原始色 Badge variant="outline" amber 与金互相抵消,必须去掉第二种黄
5. ② 分类筛选:task-hall.tsx:1144 的 FilterChip 是自绘 Button;建议直接使用官方 Tabs variant="line"(channel-tabs.tsx:32-44 已在用同一 variant,ui/tabs.tsx 的 line 枚举下 active 用 after:bg-foreground),使"分类"与"频道页签"共享同一套形状语言。
6. ③ 密度不变:gap-3 与 2/3/4 列断点保留 —— 卡片内容(标题 15px + 两行 meta + 按钮行)实测高度已确定。

S4 AI 助手

现状:agent-channel.tsx:327 根容器 main h-svh bg-muted,:349/:385 侧栏 w-64 ... rounded-xl bg-background md:my-2 md:ml-2、主区 my-2 ml-2 flex-1 ... rounded-xl bg-background;agent-chat-panel.tsx:186 消息块 rounded-lg bg-muted text-[13px];agent-citation-badge.tsx:60 引用徽标 rounded-[5px] bg-foreground/[0.055] text-[10px] text-muted-foreground,:75 弹层 w-72 rounded-xl border border-border/70 bg-background ... shadow-pop,:78 图标 text-brand;流式等待态在 agent-chat-panel.tsx:374-377 是 animate-spin 的 TraceLine(--animate-breathe 呼吸点在本版未接)。

改造:

  1. ① 三块面全部令牌化:bg-muted 画布(根容器)→ 暖灰 #eeeadf(深色 #26241d),两侧 bg-background 面板 → 暖纸白 #fbfaf6,圆角 rounded-xl 11.2px。AI 面的层级因此与主壳同源,而不是自成一套冷灰。
  2. ① 引用徽标走 --foreground/[0.055](随暖墨自动变暖)+ --muted-foreground(5.54:1);弹层走 --background + --border + --popover 族;text-brand 图标变金(5.30:1)。
  3. ② 引用徽标建议改用官方 Badge variant="outline" size(ui/badge.tsx 的 outline),替换 rounded-[5px] 这个不在半径刻度上的硬编码值。
  4. ① 流式态不上色:等待指示保持中性动画,金只留给结果 —— 防止"金 = 正在跑"侵占"金 = 已完成/进行中"的语义。

S5 管理设置弹窗

现状:space-manage-dialog.tsx:183 弹层面 fixed top-1/2 left-1/2 z-[80] ... rounded-2xl shadow-pop(尺寸用内联 w-[min(32.5rem,...)]/w-[min(50rem,...)]);:107 formSubmitButtonClass = rounded-lg bg-brand px-4 text-sm font-medium text-brand-foreground shadow-e1(已正确走品牌令牌);:117 输入 h-8 w-full rounded-lg border border-border bg-white px-3 ... placeholder:text-channel-icon focus-visible:border-brand(硬编码 bg-white);:546 成员按钮 text-emerald-600 hover:bg-emerald-50;:687 AlertDialogContent size="sm";channel-settings-dialog.tsx:476-481 DialogSurface rounded-2xl bg-popover w-[min(44rem/28rem,...)]、:495 垂直 Tabs + aside w-40 border-r bg-muted/35、:70 navItemClass h-9 data-active:bg-brand-soft。

改造:

  1. ① 提交按钮:bg-brand + text-brand-foreground → #856314 + #fffdf5 = 5.44:1(深色 10.59:1)。这是全站最重要的一颗按钮,且无需改类 —— 只换令牌值即变金。
  2. ① 设置侧栏选中项:data-active:bg-brand-soft → 金雾(rgb(176 138 20/.14)),其上的 --brand-ink 6.38:1;bg-muted/35 分栏底 → 暖灰。
  3. ② 输入框改官方 Input:ui/input.tsx 默认 h-8 rounded-lg border-input bg-transparent px-2.5 text-base md:text-sm,边界色来自 --input(对白 3.19:1)。替换 space-manage-dialog.tsx:117 的自绘输入之后,bg-white 与 border-border 双重硬编码同时消失,深色下不再出现白块。
  4. ① 弹层圆角:rounded-2xl → 14.4px,与任务卡/面板统一(shadow-pop 保留,弹层需要高度)。
  5. ② 危险操作::546 的 text-emerald-600 hover:bg-emerald-50 与 chrome.ts destructiveSidebarDeleteClass 的 text-[#f06f66] 都是原始色;建议统一用官方 Button variant="destructive"(--destructive 暖砖红/珊瑚红)。

S7 登录页

现状:auth/login-code-form.tsx:262 标题 text-2xl font-bold sm:text-[26px];:283-298 切换块 = 官方 Tabs + login-segment ... rounded-2xl p-1 + login-segment-pill ... rounded-xl(分段控件是自己写的,形状不在半径刻度上);:244/384 主按钮 h-11 w-full rounded-xl text-base font-semibold + login-btn-shimmer;:205/236/259 text-brand;auth-shell.tsx:18 页面 bg-muted/40、卡片 rounded-2xl border bg-card p-6 shadow-e2;login-glass-shell.tsx:86 玻璃卡 max-w-[430px] rounded-[32px] p-7 sm:p-9,背景 login-orb-blue/indigo/center 全部是 color-mix(in oklab, var(--brand) …%)(styles.css:1121-1147)。

改造:

  1. ① 换 --brand = 全页变金(强证据):三个光斑(login-orb-blue/login-orb-indigo/login-orb-center)与 login-glass-card、login-btn-shimmer 的值全部由 color-mix(... var(--brand) ...) 派生,只改令牌即得金色光晕 —— 这是"令牌优先"路线最直接的证据。
  2. ① 主按钮:h-11 rounded-xl 的填充 → 金 #856314 + #fffdf5 = 5.44:1;--radius 收敛后 rounded-xl 由 14px → 11.2px,按钮不再比系统里任何控件都圆。
  3. ② 分段控件(验证码切换):login-segment 是自绘样式类,建议用官方 Tabs(ui/tabs.tsx,default variant = bg-muted 容器 + active bg-background)替换自绘 pill;channel-tabs.tsx 已示范同一组件的 variant="line"。这样"登录切换"和"频道页签"是同一个组件的两种官方 variant。
  4. ① 玻璃卡 rounded-[32px] 不改:它是硬编码且不在 --radius 刻度上;本方案不通过令牌去改它(改不了),保留其"浮玻璃"质感以维持 S7 的仪式感 —— 记为 §8 风险 R5。
  5. ① 页脚/提示字(11–12px)统一 --muted-foreground:对 #fbfaf6 5.54:1,在 11px 下仍达标。

S8 应用中心

现状:app-center.tsx:1188-1189 AppCard = rounded-xl border-0 bg-card p-5 shadow-[0_0_18px_-2px] shadow-foreground/10(阴影色由 --foreground 派生 → 换暖墨即变暖影);:1204/:1207 状态角标 Badge variant="secondary";:532/:1195 emoji 图标 size-16 ... text-4xl / text-2xl;:582/:961 bg-amber-200/50 ...;:1013-1016 workspaceCatalogGrid auto-rows-fr;:1126 FilterChip 自绘;group-hall.tsx:1119 同类卡 rounded-xl border-0 bg-card p-5 shadow-[0_0_18px_-2px] hover:-translate-y-1。

改造:

  1. ① 卡面与阴影:--card #ffffff + shadow-foreground/10 → 阴影随暖墨变暖(冷暖一致性无需改类);--radius 收敛后 rounded-xl = 11.2px。
  2. ② 状态角标三档化:运行中 → Badge variant="outline" + 状态点 bg-brand(金=运行中,与 §1 主张同构);开发中 → Badge variant="secondary"(无彩);已连接 → Badge variant="default"(金底)。现状全是 variant="secondary",等于"所有状态一个样"。
  3. ② 分类筛选:FilterChip 自绘 → 官方 Tabs variant="line"(与 S3 一致)。
  4. ② emoji 图标:建议改 lucide(components.json 已配 iconLibrary: "lucide"),图标色走 --channel-icon/--interactive(3.07:1 / 7.33:1)。emoji 不受令牌控制,是不可令牌化的残留,记为风险 R6。
  5. ③ 网格:gap-3 与 auto-rows-fr 保留;列数断点不动。

S6 语音频道(本栈不可见,只给代码与库依据)

依据(不是截图):代码侧 web/src/components/app/rtc-group-call-ui.tsx、rtc-group-call-store.ts 存在完整通话 UI 与状态机;库侧 wanman3_rtc_voice_channels 30 行、wanman3_rtc_calls 183 行、会议纪要 20 行。但 TRTC_ENABLED=false 时页面零渲染:DOM 中 aria-label 匹配「语音|通话|加入」命中数为 0,/api/v1/rtc/* 返回 RTC_DISABLED。因此本方案不为 S6 产出界面改观,只给出令牌层结论:若启用,建议"正在通话"用 --brand(金,与"进行中"一致)、"结束通话"用 --destructive、邀请/成员态用 --muted-foreground,无需任何新令牌。


深浅色与对比度

对比度按 WCAG 相对亮度公式实算(L = 0.2126R + 0.7152G + 0.0722B,先做 sRGB 线性化,比值 = (Lhi+0.05)/(Llo+0.05)),字体栈/字号不影响该值。全部数值可用任意对比度工具复算。判定口径:正文 ≥4.5:1;非文本(图标/控件边界)≥3:1;纯装饰分隔线豁免 1.4.11,但必须在 §8 记账。

浅色(关键 26 组)

前景 背景 比值 判定
#26241e 正文 #fbfaf6 面板 14.86 AAA
#26241e 正文 --muted #eeeadf 12.91 AAA
#26241e 正文 --accent #e8e4d6(他人气泡) 12.19 AAA
#33280a --message-self #faf0d3 12.75 AAA
#57534a --interactive #fbfaf6 7.33 AAA(列表图标/标签字)
#57534a --interactive --muted #eeeadf 6.37 AA+
#6d5209 --brand-ink --surface-chat-selected #f5edd4 6.27 AA(选中行文字)
#6d5209 --brand-ink 金雾底(白卡合成 #f4efde) 6.38 AA
#6d5209 --brand-ink #fbfaf6 7.03 AAA
#6a655c --muted-foreground #fbfaf6 5.54 AA(12–13px 次级字)
#6a655c --muted #eeeadf 4.81 AA
#6a655c 搜索框底(--secondary/75 合成 #eeebe0) 4.85 AA
#6a655c --surface-chat-soft #f7f0dd(引用块) 5.09 AA
#856314 --brand 文字 #fbfaf6 5.30 AA(text-brand 173 处)
#856314 #ffffff 5.54 AA(text-primary 19 处)
#fffdf5 按钮字 --brand #856314 底 5.44 AA(主按钮)
#856314 --mention 香槟气泡 #faf0d3 4.87 AA(@提及)
#b23a28 --destructive 文字 #ffffff 5.95 AA
#ffffff 未读数字 --destructive #b23a28 底 5.95 AAunreadBadge
#ec6a52→不用(浅色用 #b23a28) — — —
#96907c --input 边界 #ffffff / #fbfaf6 3.19 / 3.06 非文本达标(1.4.11)
#857f73 --channel-icon 画布 #e6e2d7 3.07 非文本达标
#857f73 #fbfaf6 3.93 —
--border #e3ded0 发丝线 #ffffff 1.34 装饰性,不达标(见 R3)
--background #fbfaf6 面板 画布 #e6e2d7 1.24 层级(非对比标准;现状 1.20 且蓝灰)
--card #ffffff --background #fbfaf6 1.04 层级:靠 1px --foreground/7% 描边 + 阴影定边

补充层级/图表:--surface-chat-selected #f5edd4 选中底 vs 面板 1.12;香槟气泡 vs 面板 1.09;--chart-1..5 对面板 = 4.84 / 3.06 / 5.16 / 3.29 / 13.51。

深色(关键 22 组,全部实算)

前景 背景 比值 判定
#f2efe7 正文 #141310 画布 16.17 AAA
#f2efe7 --card #201e18 14.50 AAA
#f2efe7 --muted #26241d 13.51 AAA
#f2efe7 --accent #292620 13.13 AAA
#f6ecd2 --message-self #2b2412 13.09 AAA
#a9a49a --muted-foreground #141310 7.49 AAA(次级字反而比浅色更宽裕)
#a9a49a --card #201e18 6.72 AA
#a9a49a --muted #26241d 6.26 AA
#f0dcac --brand-ink --surface-chat-selected #2f2914 8.54 AAA
#f0dcac 金雾底(--card 合成 #3f3925) 11.02 AAA
#e3c46a --brand 文字 #141310 10.94 AAA
#e3c46a --card #201e18 9.82 AAA
#e3c46a --accent #292620 8.88 AAA
#1c160a 按钮字 --brand #e3c46a 底 10.59 AAA
#ec6a52 --destructive --card #201e18 5.36 AA
#b6b1a7 --interactive(新增赋值) #141310 8.70 AAA(旧值 #4e5058 仅 2.46,不达标)
#b6b1a7 --muted #26241d 7.27 AAA
#8f8a7c --channel-icon(新增赋值) #141310 5.39 非文本达标
#736c5c --input 边界 --card #201e18 3.20 非文本达标(旧值 oklch(1 0 0/15%) 合成 #3a3a3a 仅 1.58)
--border #302c24 发丝线 --card #201e18 1.20 装饰性,不达标(R3)
--background #141310 --card #201e18 1.11 层级
--background #141310 --surface-rail #0a0907 1.15 层级(现状 #e3e5e8 对 #0a0a0a = 15.69,即"亮竖带"缺陷)

补充:--chart-1..5 对 --card = 9.82 / 5.21 / 4.84 / 3.09 / 13.12;oklch(0.269 0 0) 等现状值按 Tailwind v4 官方 sRGB 换算(0.145→#0a0a0a、0.205→#171717、0.269→#262626、0.708→#a3a3a3、0.985→#fafafa)。

与现状的三条对照


shadcn 兼容性

web/components.json:"style": "base-nova"、"iconLibrary": "lucide"、"cssVariables": true。因此本方案的全部取值都写在 CSS 变量层(cssVariables: true 的前提),组件源码不动。

已装组件核对(web/src/components/ui/,36 个 tsx)

本方案§6 用到的组件全部已安装:button(variant: default/outline/secondary/ghost/destructive/link;size: default/xs/sm/lg/icon/icon-xs/icon-sm/icon-lg)、badge(default/secondary/destructive/outline/ghost/link;h-5 rounded-4xl text-xs)、input、textarea、tabs(variant default=bg-muted / line)、avatar(size sm/default/lg)、separator、card、dialog、alert-dialog、dropdown-menu、tooltip、popover、scroll-area、scroll-region、table、field、field-select、select、checkbox、radio-group、bubble、message、message-scroller、chat、item、input-group、collapsible、context-menu、accordion、calendar、skeleton、button-group、floating-layer。

ui/ 里缺失、但本方案会提到的官方组件(若要按 §6 的建议落地需 pnpm dlx shadcn@latest add …,属官方注册表内组件,不引入第三方):

组件 用途 替代现状
progress 任务/项目进度条 现用 toneBarClasses(tone.ts:44-53,含 bg-slate-400 原始色)
toggle-group 消息工具条 Aa / 表情(互斥态) 现用自绘 composerToolbarBtn(chrome.ts:113)
sheet 窄屏侧栏抽屉 现用 max-md: 自绘面板
switch 设置项开关 现用 checkbox 替代

不合规风险清单(必须显式记账,本方案的令牌路线无法修掉)

编号 位置/规模 问题 本方案的处理
R1 253 处 / 45 个文件使用 Tailwind 原始调色板(实测分布:amber 69、rose 68、slate 44、emerald 42、teal 12、blue 7、red 3、neutral 2、violet 2、purple 2、sky 1、cyan 1)。密集点:tone.ts:18-45(tone 映射表全体)、task-hall.tsx:181/373/902/1272(border-amber-200 bg-amber-50 text-amber-800)、app-center.tsx:582/961、space-manage-dialog.tsx:546(text-emerald-600 hover:bg-emerald-50)。另有 13 处 / 9 个文件的类内硬编码 hex:#006ce7 ×4(message-list.tsx:2921/2933、voice-channel-history-dialog.tsx:253、lib/composer-markdown.ts:363)、#f06f66 ×2(chrome.ts:163-164)、#f2f3f5 ×2(image-preview-dialog.tsx:266/268)、#7c8089、#2b2d31、#f5f6f7、#23a55a / #f0b232(tone.ts:67-68 在线状态点) 这些类不读令牌,深色下不翻转(例如 bg-emerald-50 在深色仍是近白块;text-[#006ce7] 在深色仍是那一个蓝),且与金色主张冲突 只能标注 + 给后续工单(§9 工单 W1);令牌层无解
R2 57 处 / 26 个文件硬编码 bg-white(本节引用的关键 4 处:task-hall.tsx:1215 卡面、:537/547 空态、space-manage-dialog.tsx:117 输入、app-center.tsx:576;另有 app-shell.tsx:13426、create-task-dialog.tsx、user-picker.tsx、voice-channel-section.tsx 等) 深色下这些是白块(--card 不参与) ① 只覆盖走 --card/--background 的部分;纯 bg-white 需组件层替换(§9 工单 W2)
R3 --border 全站(panelDivider bg-border/45 等) 发丝线对比 1.20–1.34:1,低于 3:1 判定为装饰性分隔(1.4.11 豁免),不倒扣;把 3:1 合规预算放在 --input(3.06–3.20)与图标色(3.07+)上。若审计要求严格 3:1 边界,需把 --border 拉到 #8c8778(浅)/#6a655a(深),代价是界面变"表格化"
R4 .dark 未定义 --interactive/--channel-icon 深色回落浅色值:--interactive 2.46:1 已修(.dark 补两行,令牌名不变)
R5 login-glass-shell.tsx:86 rounded-[32px]、login-code-form.tsx rounded-2xl/rounded-xl 分段控件、agent-citation-badge.tsx:60 rounded-[5px]、轨道/卡面 2/6/7/10/12/14/18/24/26px 混用 圆角硬编码,--radius 只能覆盖走 Tailwind 半径刻度的部分(现状 12 档 → 方案覆盖 8 档) ① 覆盖刻度内的;刻度外 4 处列入工单 W3
R6 app-center.tsx:532/1195 emoji 图标、group-members.tsx:675 宫格 emoji 的渲染色由系统字体决定,不受任何令牌控制 ② 建议改 lucide(components.json 已声明);账单 W4
R7 ui/input.tsx 默认 bg-transparent,若置于 --muted 面(如 channel-work-items.tsx:1326 bg-muted/30) 边界降为 2.66:1(浅)/ 2.98:1(深),低于 3:1 建议这两处容器改用 --card 面(§9 工单 W5),或保留该 input 的浅色描边
R8 TRTC_ENABLED=false S6 语音面零渲染(DOM 命中 0,/api/v1/rtc/* = RTC_DISABLED) 只给令牌建议,不产出界面改观(§6-S6)
R9 --sidebar-* 12 个令牌 全仓 bg-sidebar/text-sidebar/border-sidebar/ring-sidebar 引用数 0(死令牌) 取值对齐 --background/--muted,防未来启用时漂移;不删除(删令牌超出"只改值"的范围)

实施成本

文件级改动清单(路径 → 动作 → 规模)

# 文件 动作 途径 规模
1 web/src/styles.css 替换 :root(108–160 行)与 .dark(162–205 行)两块变量值;.dark 补 --interactive/--channel-icon 各 1 行 ① 约 95 行改动(38 个浅色值 + 33 个深色值 + 2 行补齐;tokens.css 可直接整块粘贴)
2 (不改)web/src/styles.css:1-106 @theme inline 保持原文(本方案不新增令牌名,映射无需调整) — 0 行
3 组件层建议(可选,均走 ②,每处独立可回滚):task-hall.tsx 状态 chip/FilterChip → Badge/Tabs line;app-center.tsx 角标 variant 三档化;space-manage-dialog.tsx:117 输入 → 官方 Input;chrome.ts composerToolbarBtn → Button ghost icon-sm;窄屏侧栏 → Sheet ② 5 处 每处 0.5–1 h

工时估算(按上表):令牌块替换 + 浅深双主题自查 = 2 h;组件层 5 处 = 4–6 h;两主题全站回归核对(8 个样例面 + 对比度复算)= 2 h。合计 8–10 h,其中只有第 1 项是必做,第 3 项可按面拆成独立 PR(互不依赖)。

验证方法(每条都能判真假)

验证项 手段 期望
令牌是否只改值 git diff web/src/styles.css 里不出现新令牌名,只有 : 右侧变化 行数变化 0(除了 2 行补齐)
金是否贯通全站 看登录页光斑与空间轨选中柱:styles.css:1121-1147 的 login-orb-* 全是 color-mix(var(--brand)),chrome.ts:47-50 走 bg-brand 两者同时变金(同源验证)
三栏层级是否成立 DevTools 取 --workspace-background 首色与 --background,复算 WCAG 相对亮度 浅色 1.24:1 / 深色 1.15:1
深色缺陷是否修复 注入 .dark 后逐项取计算值 --surface-rail = #0a0907(不再是 #e3e5e8)、--interactive = #b6b1a7(不再是 #4e5058)
对比度是否达标 对 §7 两张表逐行复算(公式见 §7 开头) 正文 ≥4.5、非文本 ≥3;唯 --border 1.20–1.34 已知且已标注
无组件被顺带改坏 只改 styles.css 的前提下,组件类名 diff 必须为空 除 §9 表中第 3 项外零组件改动

回归清单(必须人工看的 8 处)

  1. 空间轨金柱 + 选中项(chrome.ts:47-52)在浅/深两主题下是否都成立(#856314/#e3c46a)。
  2. 会话行选中 selectedRow 的 --brand-ink 是否压得住 6.27:1 / 8.54:1。
  3. 自己 vs 他人消息气泡在深色下是否仍可区分(#2b2412 vs #292620,色相差小 → 若人工判定不可分,改 --accent 为 #2a2720 或把 --message-self 提高到 #332a15,两值都需复算)。
  4. 未读红点数字(#b23a28/#ec6a52 上白字 5.95:1)在两主题下的可读性。
  5. 任务卡状态 chip 灰底灰字(7.33:1 / 7.27:1)在 12px 下是否偏弱。
  6. 弹层:rounded-2xl 14.4px 后 shadow-pop 是否仍压得住表面对比(1.20:1 的发丝线定边)。
  7. 登录页玻璃卡与金色光斑叠加后,主按钮金底是否仍突出(避免"金上金")。
  8. 深色输入框边界 3.20:1 在 --card 面、以及 §8 R7 提到的 --muted 面上的 2.98:1。

后续工单(本方案之外,均已在本方案定位)


取舍

得到了什么

  1. 层级第一次成立:侧栏/主区/画布三层在不改组件的前提下有了 1.24:1(浅)/ 1.15:1(深)的面差(现状侧栏与页面 1.00:1),并顺带修掉深色下的亮竖带与 2.46:1 的图标色两个真实缺陷。
  2. 一种颜色承担全部强调:金的出现位置有明确语义(当前空间 / 我发的消息 / 进行中任务),--brand 一个值驱动 bg-brand 158 处 + text-brand 173 处 + 登录页全部光斑;改一处等于改全站视觉重心。
  3. 对比度从"未测"变成"可核对":46 组实算值写进方案与 tokens.css 注释,最小正文档 4.81:1、非文本最小 3.06:1,全部可复算。
  4. 零组件风险:所有改观只落在 styles.css 两个变量块(约 95 行),不新增令牌名、不改 @theme inline、不动 36 个 ui/ 文件,Flutter 端同构。

付出了什么

  1. 彩色状态编码的丰富度:tone.ts 的 emerald/teal/amber/blue/rose 五色在视觉上被"金/暖灰/红"压制。取舍立场:这些颜色本来就是不可令牌化的泄漏源(深色不翻转),但收敛它们需要组件层工作(W1);本方案只把"能令牌化的部分"(slate 系、brand 系)先收进来,因此过渡期内会出现"金色 chip 与琥珀色 chip 并存"的不一致——这是本方案最明显的短期代价。
  2. 金"一亮一深"的双值:浅色必须有深金 #856314(亮金在 #fbfaf6 上约 2.9:1 不达标),深色必须用亮金 #e3c46a(深金在暗底不可见)。代价是"两个品牌色号",跨端取色时要按主题取;好处是每个主题都能同时满足"填充 + 文字"双角色。
  3. 发丝线仍在 1.20–1.34:1:为保住"编辑式留白"的观感放弃了严格 3:1。若合规审计拒绝豁免,把 --border 提到 #8c8778(浅)/#6a655a(深)即可,但界面会明显变"表格化"——本方案选择前者并显式记账。
  4. 不再有飞书式蓝:--mention 与 --brand 合并后,@提及不再与链接、主按钮区分色相,靠字重/底纹/位置区分。对话型产品中"@提及"的高亮辨识度会略降,这是本方案最有争议的一条。
  5. 深色下自己/他人气泡的区分度收窄:#2b2412 vs #292620 的面差很小,靠色相(金 vs 暖灰)区分。已在 §9 回归清单第 3 条给出备选值。

不适用场景

一句话总结取舍

用**「一种颜色 + 一层暖灰面差」换掉现有的「三种蓝 + 零层级 + 深色不翻转」**;代价是所有彩色状态编码都要向金/灰/红三档收敛,而这一步的最后一公里(Tailwind 原始色 253 处 / 45 文件、类内硬编码 hex 13 处 / 9 文件、硬编码 bg-white 57 处 / 26 文件)不在令牌路线上,已全部列成 W1–W6 工单。