dsh-label-tune
Manifest validdsh font brightness control
dsh-label-tune
Calm down the over-bright text of the DSH web GUI (dark theme): softer label tokens, a relaxed bold weight, and lighter headings. Pure client-half plugin — no host code, no restart, no runtime dependencies.
把 DSH Web GUI 深色主题里过亮的文字压下来的小插件(纯客户端半边,零依赖、零构建)。
安装
| 场景 | 做法 |
|---|---|
| 桌面版 App(profile 由 Electron 独占管理,CLI 装不进去) | 在 App 的插件市场里搜 dsh-label-tune 或填仓库地址安装 → 重启 App |
CLI + web profile | dsh plugin --profile web add github:<owner>/dsh-label-tune,再把 dsh-label-tune 加进 %USERPROFILE%\.dsh\profiles\web\package.json 的 dsh.profile.bundles |
本地开发(link:) | dsh plugin --profile web add link:F:\path\to\dsh-label-tune |
| 零安装(不碰 DSH) | 把仓库里的 dsh-label-tune.css 贴进 Stylus 用户样式(域 http://127.0.0.1:19387),或任意自定义 CSS 插件(dsh-custom-css、dsh-theme-studio 的 Custom CSS 框) |
为什么桌面板要用市场装:dsh plugin --profile desktop add ... 会被拒绝 ——
error: profile "desktop" is managed exclusively by the Electron application。
桌面 profile 的插件只能走 App 自己的市场/插件通道。
生效方式
只有客户端半边 ⇒ 保存后刷新页面(F5)即生效,不需要重启 dsh web。 只有"新增了配置层"(刚装完插件)才需要重启一次进程。
它改了什么
| 部位 | 官方 | 本插件 |
|---|---|---|
正文 --dsw-alias-label-primary | bluish-50 rgb(249,250,251) 17.4:1 | bluish-200 rgb(225,229,238) 14.5:1 |
正文暗档 -primary-dimmed | bluish-100 | bluish-300(一起压,否则它比正文还亮、层级倒置) |
次要 -secondary | bluish-300 | bluish-300(不变) |
三级 -tertiary | bluish-400 | bluish-400(不变) |
加粗 <strong> | 与正文同色 + 字重 600 | 颜色降到 bluish-300 + 字重 500 |
| 标题 h1–h3 / h4 | 700 / 600 | 600 / 500 |
对比度按底色 rgb(21,21,23) 手算(WCAG AAA 正文要求 7:1)。
为什么加粗要单独处理:DSH 没有给加粗单独的颜色 token(grep strong 在
@deepseek-ai/dsh-client-ui-conversation 里 0 命中),它继承正文颜色,唯一差别是字重。
Windows 上微软雅黑只有 400/700 两个真实字重,600 由 Chromium 合成加粗(涂抹),
笔画发糊就会显得比正文刺眼 —— 所以这里把加粗降到 500 并压暗一档。
实现全部引用官方静态变量(var(--dsw-static-neutral-bluish-N)),不写死 rgb,跟随上游配色。
微调
| 想要的效果 | 改哪里 |
|---|---|
| 正文再亮一档 | --dsw-alias-label-primary → bluish-150(15.5:1) 或 bluish-100(15.7:1) |
| 正文再暗一档 | → bluish-300(12.1:1) |
| 加粗再暗 | strong 段的 bluish-300 → bluish-400(8.5:1) |
| 加粗用真 Bold | strong 段 font-weight: 500 → 700 |
| 加粗保持原色 | 删掉 strong 段里的 color 行 |
| 标题别那么重 | 第 3 段 h1–h3 600 → 500,或整段删掉 |
| 浅色主题同样处理 | 去掉末尾可选段的注释 |
自测
node --test test/verify.mjs
用最小 DOM/window 桩离线跑:模块契约(id / apply / inject)、样式只注入一次、
注释配平、定稿色阶与加粗/标题规则在位、生效规则里不出现写死 rgb(),
以及"实测无效的那组 markdown strong token 不再出现"的回归保护。
卸载
移除插件即可;临时恢复可在 DevTools 里
document.getElementById('dsh-label-tune-style')?.remove()(仅当次会话)。
备注
--dsw-font-markdown-base-strong* 这组 token(定义在
@deepseek-ai/dsh-client-ui-theme/lib/styles/gradient-shadow-text.css:57-62)
实测覆盖后观感无变化,说明渲染器不消费它,因此本插件不启用该段,只保留选择器级规则。
peerDependencies 里只声明了一个可选的 @deepseek-ai/cordis:宿主从 0.2.0-rc.1 起会在
boot 阶段按插件声明的 peer 范围做 semver 闸门(范围外的层被静默跳过,日志
dsh: skipping profile bundle "X")。这里用 >=4.0.0 这种显式区间而不是 ^,
避开 0.x caret 被规范化成 <0.2.0-0 的坑。
License
MIT © 2026 Upstream196
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
Comments
Loading…
Similar plugins
by uckkk
灯泡选购
★ 0
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-bulb-buyby uckkk
阅读灯光
★ 0
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-reading-lightby uckkk
漂白安全
★ 0
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-bleach-safetyby uckkk
文本换行
★ 0
MIT
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-text-wrapby qipenglin
Light and dark theme presets for DeepSeek Harness Web
★ 0
MIT
TypeScript
Aug 29, 2026
dsh plugin --profile web add @qipenglin/dsh-theme-spectrumby uckkk
光照需求参考
★ 0
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-light-need