dsh-theme-plugin

19Star1Fork0Issue0Watching
机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科
语言
JavaScript
License
MIT
分支
main
dsh-plugindsh-plugin-marketdsh-plugins

安装

$ dsh plugin --profile web add github:nevertoday/dsh-theme-plugin

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 nevertoday/dsh-theme-plugin:先查看仓库 https://github.com/nevertoday/dsh-theme-plugin 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

Chinese traditional colors as a DeepSeek Harness theme pack. 49 anchor colors × light/dark = 98 themes, each writing the full token vocabulary (98 tokens: 89 --dsw-* plus 9 --shiki-token-* syntax slots) and clearing WCAG AA on all 3136 contrast assertions. Twelve of the anchors are marked as a curated shortlist.

📖 中文文档

竹青 light: raw-silk paper, a green wash on the bubble, and a send button in the anchor green itself 朱红 dark: sized-xuan paper in warm ink, a deep maroon wash, and a vermilion send button
群青 light: violet-tinted silk paper, a blue wash, and a blue send button 藤黄 dark: ochre paper in olive ink, an olive wash, and a gold send button

竹青 · light(素绢)  |  朱红 · dark(熟宣)
群青 · light(雪青)  |  藤黄 · dark(赭纸)

One anchor per paper family, same conversation in each. The most saturated patch on screen is always the color you picked.

Install

npx -y @deepseek-ai/dsh plugin --profile web add dsh-theme-plugin@latest
npx -y @deepseek-ai/dsh --profile web          # boot → open http://127.0.0.1:3080/

This pulls the prebuilt bundle from npm — no clone, no build step. The web profile is created on first boot under ~/.dsh/profiles/web.

  • Verify — the browser console logs registered 98/98 themes (49 light / 49 dark), and dsh --profile web --dump-config shows a theme-zhongguo row.
  • Update — run the same add command again.
  • Uninstalldsh plugin --profile web remove dsh-theme-plugin

Usage

Open Settings → Traditional Colors and pick a theme; it applies immediately. Themes also have deep links:

http://127.0.0.1:3080/#theme=zhuqing-light      # 竹青 light
http://127.0.0.1:3080/#theme=qunqing-dark       # 群青 dark

Changing the hash switches themes live. A deep link wins over your remembered pick. The remembered pick lives in localStorage, not in settings.yaml, so it does not follow you across devices.

Four ways to find a theme

The picker on its default view: all 49 anchors of the light branch, grouped into the four paper familiesThe 凌晨 夜航 chip pressed: the list narrows to the eight dark-and-quiet themes, spanning all four paper families
Browse — opens on all 49 anchors of the current branch, grouped by paper family. Each row's chip is the theme's real paper, veil and focus, so the list previews itself.By working mood — six chips read left to right as one day: 晨起 morning → 天亮 dawn. Pick 凌晨 夜航 and you get the eight dark-and-quiet themes, whatever their color.
Typing the pinyin lv into the search box narrows the list to the twelve green themesCurated only on the dark branch: twelve edited picks, the panel itself rendered in 竹青 dark
Search — matches the Chinese name, its pinyin, the seal's name and the mood. Typing lv finds all twelve greens without switching keyboards.Curated only — twelve edited picks covering all four papers and all six moods. Use it when 49 is too many; the panel is themed by the pack, so the dark branch looks like this.

The panel references nothing but --dsw-* tokens, which is why it changes color with your pick and doubles as a preview of whatever you are about to choose.

Design: 纸 · 帘 · 印

Chinese painting does not start with color. It prepares the paper, washes over it, and signs last. These themes are built in that order, and the three characters name three layers.

纸 Paper — about 60% of the screen. The ground is not "the traditional color, lightened"; it is a different material. Four families — 素绢 raw silk, 熟宣 sized xuan, 雪青 violet-tinted silk, 赭纸 ochre paper — carry deliberately separated chroma (OKLab ≈ 0.010 / 0.019 / 0.015 / 0.024 respectively), so the four papers are told apart by eye and not only in the data. Light grounds sit at L ≈ 0.963–0.971: off-white rather than white, which is what leaves room for a raised surface above them.

帘 Veil — about 25%. The sidebar and message bubbles are the anchor color itself, undiluted by paper, held inside a band of 1.25–1.55 contrast against the paper so the wash can neither disappear nor harden into a slab. You recognize which traditional color you are in by the bubbles, not by the background.

印 Sealthe focus is the anchor itself. The primary button and the send button are the anchor pressed darker. This reverses the pack's original law, under which the primary button was filled by a curated relative of the anchor sitting a median 109° away in hue — so choosing 竹青 handed you a crimson call-to-action. That relative is still chosen, still recorded per theme as sealName / sealRel / sealWhy, and now appears only as the active-nav accent: a signature rather than a focus. The picker shows the reasoning ("茜红 · 策展印 · 冷暖对冲").

Ink — text, rules and secondary surfaces run down one ink ramp, the paper color pushed darker. Every nb-XX step of the base stylesheet becomes a tinted neutral of the same lightness, and hover offsets, elevation steps, borders and interaction alphas are copied verbatim: hue changes, relations do not. The ramp's two endpoints are the deliberate exception — those are set here rather than inherited, because the base stylesheet's are the extremes. Light and dark now share one shape: body 16.7–17.5, secondary 7.4–8.0, tertiary 4.6–5.5.

Syntax — the code block is where a programmer's eyes actually live, so the highlighter is themed too. The harness highlights through shiki's css-variables theme (nine --shiki-token-* slots), and every theme fills them: the five chromatic slots (keyword / string / constant / function / parameter) keep the hue conventions programmers already know, but each color is a real named color picked from the 742-color roster; when the anchor's hue falls within a slot's window, the anchor itself plays that slot — in 竹青 the strings are 竹青, in 群青 the constants are 群青. Comments and punctuation are ink, not color: the tertiary and secondary ink steps re-gated against the code-block ground. All nine slots clear 4.5 on that ground, and the five chromatic slots are asserted pairwise ≥ 15° apart in hue.

Gates — AA is a floor, and elegance lives at the ceiling, so most rules are two-sided. pnpm check re-derives every claim above from the emitted tokens: 3136 contrast rows, plus invariants for veil chroma, the single focus (both focus tokens must be the anchor's own hue and the most saturated patches on screen), syntax-slot hue separation, the anchor-on-stage rule, elevation direction, and full token coverage. It trusts nothing the generator says about itself.

Six tiers — 49 color names are not a usable set of options for someone who does not already know traditional colors, so every theme also carries a "how do I want to work today" tier. It is derived: the only inputs are the anchor's OKLab lightness, chroma and hue.

L < 0.50 ─┬─ C < 0.13 → 夜航 Night   (dark and quiet)
          └─ C ≥ 0.13 → 爆肝 Crunch  (dark and fierce)
C < 0.115 ──────────→ 禅定 Zen       (pale and quiet)
warm (h<120 or h≥315) ─┬─ L < 0.71 → 攻坚 Push  (warm and fierce)
                       └─ L ≥ 0.71 → 收工 Ship  (warm and bright)
cool ───────────────→ 心流 Flow      (cool and saturated)

The picker orders them as a programmer's day: Flow at dawn → Zen in the afternoon → Push in the evening → Crunch at midnight → Night in the small hours → Ship at daybreak → Flow again. Anchors land 心流 11 · 禅定 12 · 攻坚 8 · 爆肝 4 · 夜航 8 · 收工 6.

An earlier design gave each of five moods one representative theme, which left most rows in the picker with an empty tag — it read as missing data rather than restraint. As a partition the vocabulary stays at six words while every theme belongs to exactly one tier, so the tag has no holes and doubles as a filter. Six is this data's natural granularity: a seventh cut anywhere carves out a 1–3 theme sliver, at which point the label names a few themes rather than classifying them. The tier names are an editorial claim, but that is six claims rather than 49; pnpm check pins all four cuts with seven sentinels (群青→Flow, 碧螺春绿→Zen, 朱红→Push, 覆盆子红→Crunch, 满天星紫→Night, 黛紫→Night, 雄黄→Ship), so breaking the tree trips the gate while renaming a tier does not.

Curation — twelve of the 49 anchors carry a curated flag, reachable through Curated only. Both light and dark variants must contain no generator degradation. The list is derived in three passes: editorial seeds → one per tier (every tier must survive the narrowing, or its chip would have nothing to offer) → farthest-point sampling in OKLab up to twelve. Every top-up picks the anchor farthest from what is already chosen, so covering all six tiers costs nothing in spread.

Anchors per paper family: 素绢 12 · 熟宣 14 · 雪青 17 · 赭纸 6. Within one mode, the two closest themes still differ by ΔE 0.018 across the four signature dimensions (ground, brand, bubble, focus) against a 0.015 floor.

Theme roster

49 anchors × light/dark = 98 themes — click to expand

⭐ marks the twelve curated anchors the picker shows first. Display names are <name>·亮 / <name>·暗, e.g. 竹青·暗. Paper families: 素绢 raw silk, 熟宣 sized xuan paper, 雪青 violet-tinted silk, 赭纸 ochre paper. The seal column is the curated relative described above — a signature mark, not the button color.

Color中文AnchorPaperSealTheme ids (light / dark)
Zhu Qing竹青#00A86B素绢茜红zhuqing-light / zhuqing-dark
Zhu Hong朱红 ⭐#ED5126熟宣赭石zhuhong-light / zhuhong-dark
Qun Qing群青#1772B4雪青枫叶红qunqing-light / qunqing-dark
Teng Huang藤黄#FFD111赭纸瑶碧tenghuang-light / tenghuang-dark
Jiang Zi绛紫 ⭐#8E354A熟宣洋葱紫jiangzi-light / jiangzi-dark
Zi Yun紫云#A020F0雪青蜻蜓红ziyun-light / ziyun-dark
Mei Hong Se玫红色#FF007F熟宣品红meihongse-light / meihongse-dark
Dan Shu Hong淡曙红#EE2746熟宣殷红danshuhong-light / danshuhong-dark
Gan Qing绀青#4F84FF雪青落霞ganqing-light / ganqing-dark
Mei Gui Zi玫瑰紫#BA2F7B熟宣高粱红meiguizi-light / meiguizi-dark
Ying Wu Lü鹦鹉绿#5BAE23素绢猩红yingwulv-light / yingwulv-dark
Bo Luo Hong菠萝红#FC7930熟宣芙蓉红boluohong-light / boluohong-dark
Fu Pen Zi Hong覆盆子红 ⭐#AC1F18熟宣苋菜红fupenzihong-light / fupenzihong-dark
Cang Bi苍碧#2A52BE雪青猩红cangbi-light / cangbi-dark
Xiong Huang雄黄 ⭐#FF9900赭纸绀青xionghuang-light / xionghuang-dark
Hu Po Huang琥珀黄#FEBA07赭纸绀青hupohuang-light / hupohuang-dark
Wei Zi魏紫#7E1671雪青魏紫·深weizi-light / weizi-dark
Gan Lan Huang Lü橄榄黄绿#BEC936素绢魏紫ganlanhuanglv-light / ganlanhuanglv-dark
Huo Zhuan Hong火砖红#CD6227熟宣淡可可棕huozhuanhong-light / huozhuanhong-dark
Xiang Ye Hong香叶红#F07C82熟宣鹅冠红xiangyehong-light / xiangyehong-dark
Yan Ying Zi烟萦紫#8A4B9C雪青烟萦紫·深yanyingzi-light / yanyingzi-dark
Mei Ge韎韐#A5441B熟宣蟹蝥红meige-light / meige-dark
Li Shou綟绶#6B8E23素绢暗紫苑红lishou-light / lishou-dark
Zi Teng Luo紫藤萝 ⭐#9B8AE8雪青淡罂粟红zitengluo-light / zitengluo-dark
Han Xiu Lü汉绣绿 ⭐#2E7D32素绢绛紫hanxiulv-light / hanxiulv-dark
An Zi Yuan Hong暗紫苑红#82202B熟宣殷红anziyuanhong-light / anziyuanhong-dark
Xin Lü新绿 ⭐#6CC788素绢茜裙xinlv-light / xinlv-dark
Ling Meng Hong菱锰红 ⭐#D276A3熟宣苋菜紫lingmenghong-light / lingmenghong-dark
Man Tian Xing Zi满天星紫 ⭐#2E317C雪青栗紫mantianxingzi-light / mantianxingzi-dark
Kong Que Lan孔雀蓝#0EB0C9雪青胭脂红kongquelan-light / kongquelan-dark
Bao Shi Lan宝石蓝 ⭐#2486B9雪青朱墙baoshilan-light / baoshilan-dark
Mei Die Lü美蝶绿#12AA9C素绢枫叶红meidielv-light / meidielv-dark
Bian Dou Zi扁豆紫#A35C8F雪青扁豆紫·深biandouzi-light / biandouzi-dark
Qian Zi Teng Luo浅紫藤萝 ⭐#D1B3FF雪青杏子qianzitengluo-light / qianzitengluo-dark
Qing Fan Lü青矾绿#2C9678素绢汉绣红qingfanlv-light / qingfanlv-dark
Bi Luo Chun Lü碧螺春绿#867018赭纸苍碧biluochunlv-light / biluochunlv-dark
Gan Lan Shi Lü橄榄石绿#B2CF87素绢酢酱草红ganlanshilv-light / ganlanshilv-dark
Fen Tuan Hua Hong粉团花红#EC9BAD熟宣锦葵红fentuanhuahong-light / fentuanhuahong-dark
He Ye Lü荷叶绿#1A6840素绢栗紫heyelv-light / heyelv-dark
Shi Lü石绿#57C3C2素绢银红shilv-light / shilv-dark
Zha Ye Zong柞叶棕#692A1B熟宣栗棕zhayezong-light / zhayezong-dark
Chang Chun Hua Lan长春花蓝#7EC0EE雪青香叶红changchunhualan-light / changchunhualan-dark
Shan Geng Zi山梗紫#61649F雪青满江红shangengzi-light / shangengzi-dark
Yan Lan鷃蓝#144A74雪青枣红yanlan-light / yanlan-dark
Fen Lü粉绿#83CBAC素绢梅红fenlv-light / fenlv-dark
Yu Qin Lan玉鈫蓝#126E82雪青赭石yuqinlan-light / yuqinlan-dark
Pi Bian皮弁#8B5D33赭纸石青pibian-light / pibian-dark
Gan Lan Lü橄榄绿 ⭐#5E5314赭纸满天星紫ganlanlv-light / ganlanlv-dark
Dai Zi黛紫#5D3A6F雪青黛紫·深daizi-light / daizi-dark

The roster is whatever the generator emits; it is not maintained by hand.

Development

Requirements: Node.js 20+ and pnpm 10.15 (declared through packageManager). Tests use tsx, so the same command works on Node 20 and newer.

git clone https://github.com/nevertoday/dsh-theme-plugin
cd dsh-theme-plugin
pnpm install && pnpm build          # builds lib/client.js, the browser bundle
dsh plugin --profile web add -w .   # register this directory
dsh --profile web
  • -w is required because the profile directory is a pnpm workspace root. add links the directory and appends the package to dsh.profile.bundles; the loader then reads lib/client.js from your working copy, so pnpm build is what makes changes visible.
  • The repo ships an .npmrc with auto-install-peers=false. Without it pnpm ≥ 9 cannot install: it tries to fetch the optional @deepseek-ai/* peers, and one of them depends on a package that was never published.
  • pnpm build needs tsdown; node scripts/build-esbuild.mjs is the fallback.
  • Committing lib/ is optional. The primary build is currently about 640 KB plus a 934 KB sourcemap (the esbuild fallback is a little larger); both builders are held below 680 KB / 1020 KB release budgets.

DSH 0.1's client boot manifest does not carry host plugin config, so this package intentionally exposes no cordis.yml config block. User choices enter through the picker or #theme= and persist in the browser.

Gatespnpm check (3136 contrast rows plus invariants) and pnpm test (60 tests, including a load-time lock on lib/client.js). Neither needs a running harness.

Regenerating the themespnpm generate reads the color data and OKLab math from the 中国传统色 repository. Point it there:

ZH_COLORS_REPO=/path/to/zhongguo-traditional-colors pnpm generate

It also looks one directory up and at a sibling checkout, so a conventional layout needs no environment variable. The two executable inputs are pinned by SHA-256 to upstream revision 3f5fc62; review and update those fingerprints before accepting an upstream change. The generator is deterministic — no clock, no randomness — so an unchanged input must reproduce byte-identical output.

License

MIT — see LICENSE.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/nevertoday/dsh-theme-plugin)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录