DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-plugin-bg-color

f

dsh-plugin-bg-color

Manifest valid

DSH background-color plugin: live-tune window, surface, overlay and sidebar colors, with built-in light and dark presets.

UI (client)hasBundlePatch

dsh-plugin-bg-color

简体中文 · English

在 DSH 里实时调整整窗、面板、浮层和侧边栏的背景色。每改一次颜色都直接作为主题 token 覆盖层生效,不重载页面。

功能

面板浮在 Web 界面右下角,提供:

  • 8 套配色组合,每套都同时写了浅色和深色两版,点一下不管当前是哪种模式都会立刻看到变化。所有预设都停在明度安全区(浅色版主底 ≥ #ed,深色版 ≤ #2c),这样主题自带的文字颜色不会被顶掉。
  • 分区微调:原生取色器 + 可直接粘贴的十六进制输入框。
  • 浅色 / 深色分栏:两个模式能分别调,面板上标了当前实际生效的是哪个。
  • 全部重置:撤掉覆盖层,回到内置配色。

选择存在 localStorage 的 dsh-plugin-bg-color.regions 里,刷新页面自动恢复。

改了哪些 token

用的是 theme.overrideTokens() 叠一层覆盖,不是替换主题,所以卸载时能干净撤掉。

区域Token
整窗底色--dsw-alias-bg-base
一级面板--dsw-alias-bg-layer-1
二级面板--dsw-alias-bg-layer-2
浮层与弹窗--dsw-alias-bg-overlay
侧边栏--dsw-specific-sidebar-fill

这些 token 名是 DSH 内部约定。将来改名只会让外观退化,不会让界面渲染崩掉。

安装

从插件市场装

前提:DSH 的插件市场能力默认关闭,要先启用官方实验 bundle,否则 Plugins 页里不会出现 Discover 标签。

  1. Plugins 页 → Experimental plugins → 打开 Custom plugin indexes
  2. 打开 Discover,把下面这个地址加为索引源:
https://raw.githubusercontent.com/fox007xp/dsh-plugin-bg-color/main/index.json
  1. 索引抓取成功后,列表里会出现「背景色调节」→ Install

没有那个开关,说明市场能力还没启用,第二步也无从下手,先把第一步做完。

直接装本地目录

适合自己改代码、想立刻看到效果的场景:

plugin_manager install_bundle, target: <本目录路径>

文件结构

文件作用
index.jsHost 半;不声明服务、没有配置。
client.jsClient 半;面板 + token 覆盖层。
cordis.patch.yml插入 bg-color 这一行。
locale/en.json、locale/zh.json插件管理器里显示的中英标题与描述。
index.json插件市场索引(format 1,git 源)。
icon.svg原创图标。
.github/workflows/ci.ymlCI:语法检查、官方校验器验索引、核对 pin 的 commit。
tooling/check.mjs本地跑同一套检查。
VERIFICATION.md验证记录:验过什么、怎么验的、哪些没验。

本地校验

push 到 main、打 tag 或提 PR 时,CI 会自动跑下面这套检查。本地复现:

npm install --no-save --no-package-lock --ignore-scripts @deepseek-ai/dsh-plugin-market-index@0.2.2-rc.1
node tooling/check.mjs

检查内容:三个 JS 文件的语法、package.json 与 locale JSON 可解析、index.json 通过官方 parseMarketIndex(不是自己模拟的规则)、索引里最新版本号与 package.json 一致、每个 git 源 pin 的 commit 在本仓库确实存在、cordis.patch.yml 确实插入了本包。

tag 触发时只核对「tag 名 == v<版本号>」:release tag 指向的是装包的那个提交,索引由 main 上的后续提交更新,所以版本一致性检查只在分支和 PR 上跑。

验证记录

市场能否抓到、安装参数能否装上、装进 profile 后能否激活,逐条记在 VERIFICATION.md,包括明确标注「没有验证」的部分。

已知限制

  • 只暴露上面 5 个背景 token;品牌色、边框色、文字色仍归主题管。
  • 覆盖背景不会重算对比度:中间灰度会让文字看不清,所以预设刻意避开中间调。
  • 面板挂在 shell.overlay,浮在所有列之上,任何视图下都能用。
  • 索引更新有两层缓存:GitHub raw 的 CDN(实测约 50 秒)+ Host 的索引缓存(默认 10 分钟)。

许可证

MIT,见 LICENSE。

Comments

Loading…

Similar plugins

dsh-theme-pack

by MoYu-CN

Extra light and dark color themes for the DSH UI, registered as pure color tokens on top of the official theme runtime.

Manifest valid

★ 0

MIT

JavaScript

Oct 12, 2026

dsh plugin --profile web add dsh-theme-pack
dsh-theme-tuner6

No screenshots

by shawnlone

Add a theme-adjustment panel under Appearance to customize accent, background, foreground, contrast and gradient, applied live through theme token overrides.

Themes & SkinsManifest valid

★ 3

↓ 336/wk

MIT

JavaScript

Oct 12, 2026

dsh plugin --profile web add dsh-theme-tuner

by Alicex7777

DSH Web 界面配色调节插件:在设置里直接调整会话栏、左右侧栏与文字色,含 OKLCH 深度/鲜亮度调节、日间夜间方案与预设

Terminal & ClientsManifest valid

★ 0

MIT

JavaScript

Oct 2, 2026

dsh plugin --profile web add dsh-theme-colors

by lssyd20070106

Third-party DSH WebUI enhancement plugin: custom backgrounds, theme colors, prompt presets, token/context visibility, and manual compact.

UI & ExperienceManifest valid

★ 6

MIT

JavaScript

Aug 14, 2026

dsh plugin --profile web add dsh-ui-preset-enhance

by suwenner

A beautification/skin pack plugin for DSH, supporting replacement of Live2D models, changing backgrounds, and more.(一个DSH的美化插件,支持live2d模型替换,更换背景和主题颜色等)

Development & InfrastructureManifest valid

★ 3

MIT

JavaScript

Oct 30, 2026

dsh plugin --profile web add dsh-live2d-theme

by theroi

DSH 个性化插件:自定义背景 + 半透明玻璃 + 主题色

Manifest valid

★ 0

MIT

JavaScript

Oct 15, 2026

dsh plugin --profile web add dsh-bg-panel