dsh-hero-theme: Building Real-Time Themes in DSH with the HeroUI v3 Formula

Foreword

DeepSeek Harness (DSH)’s Web and embedded Desktop workspaces feature a design token layer. If you only change a few CSS places for skinning, it often doesn’t align with built-in components, light/dark mode, and Shiki highlighting; you also have to repeatedly restart the profile or go through the build pipeline. The community plugin dsh-hero-theme (maintainer Lhy723) brings the HeroUI v3 official theme builder’s ideas into DSH: drag the accent color, neutral color concentration, radius, and font in settings, and the entire set of alias/specific/shadows/timing tokens will be recalculated according to formulas, taking effect immediately via ctx.theme.overrideTokens() and writing to the current profile’s Cordis patch, with no rebuild or profile restart required. The directory is categorized as “Fun Outfits”; the project is currently about 1 star on GitHub (subject to the repository page).

What is this

dsh-hero-theme is a HeroUI v3 theme builder for DSH Web and Desktop workspaces. It generates a complete color palette and component geometric styles based on your choices in the UI, and overlays a HeroUI brand layer (gradient primary buttons, aurora background, opaque surfaces, Slider/Tabs/Select control animations, etc.) on top of the default tokens. The license is MIT; the npm package version is 0.2.16 (2026-11-14 changelog) in the info, and it requires the DSH client ecosystem around ^0.2.2-rc.1.

Core Features

Below, the proven capabilities mentioned in the README are explained in blocks, without expanding on configuration fields not appearing in the info.

Seven Real-Time Controls

The settings path is Settings → General → HeroUI theme. The interface is similar to the HeroUI theme page: rainbow accent color sliders, an expandable color wheel (hue/lightness/Vibrant, palette, hex, random), radius and form radius presets, 11 brand presets, and Light/Dark/System.

Control Range or Options Default Function (Summary)
Accent hue 0–360 · chroma 0–0.4 · lightness 0–1 #0485F7 Accent color, focus ring, gradient start point
Base chroma 0–0.02 0.0015 Chroma of all neutral colors (background, surface, text, border)
Font Family Inter / System UI / Geist / Manrope / IBM Plex Sans / JetBrains Mono Inter --dsw-font-family and brand font stack
Radius XS / S / M / L / XL M (8px) HeroUI radius scale and card radius (3×)
Radius Form XS / S / M / L / XL L (12px) Input boxes and form fields
Theme 11 presets Default Sky, Lavender, Mint, Netflix, Uber, Spotify, Coinbase, Airbnb, Discord, Rabbit, etc.
Light / Dark / System — Dark Light/dark adaptation and ctx.theme.setTheme()

The default accent color is HeroUI Blue #0485F7, corresponding to oklch(62.04% 0.195 253.83); the secondary color gradient rotates about 31.67° on the color wheel. Enabling Vibrant will multiply the accent color chroma by 1.1 and neutral chroma by 1.8. The font needs to be installed locally; otherwise, it falls back to System UI.

Token Generation Scale and Formulas

The generator aligns with the HeroUI v3 builder formulas, for example, light background oklch(97.02% base hue), dark background oklch(12.00% base hue), accent color oklch(62.04% 0.195 hue), and success/warning/danger rotate based on accent hue for semantics. The README states: 167 tokens × 2 schemes (one for light and one for dark), including alias, specific, Shiki, radius, shadow, timing.

Regarding radius: cards 3×, Tabs 2.5×, popups 2× + 6px, and form fields have a separate scale; DSH semantic scale is xs 0.5× / sm 1× / md 1.5× / lg 2× / xl-panel 3×.

Brand Layer and Accessibility

src/hero.css adds HeroUI signature visual details on top of the generated tokens: primary button accent→violet gradient and soft light, session area Aurora, opaque bubbles and menus, 36px secondary buttons and 0.97 press scale, Tabs sliding indicator, Select popup 150ms enter / 100ms exit, etc. The info notes: under prefers-reduced-motion: reduce, new transitions and enter/exit animations will stop.

Persistence and Reset

Every adjustment is applied immediately and saved to the currently active profile’s Cordis patch; Reset restores the builder’s default values. The 0.2.16 changelog mentions: fixed state bounce when switching themes, the builder will ignore its own pending writes’ stale echoes.

Installation and Usage

The plugin runs with the permissions of the current DSH process; please check the GitHub source code and the MIT license yourself before installing to see if they meet your environment requirements. The installation method given by the official README is as follows.

DSH CLI (Web or Desktop profile):

# DSH Web
dsh plugin --profile web add dsh-hero-theme
# DSH Desktop
dsh plugin --profile desktop add dsh-hero-theme

You can also manually install in the Web profile directory:

cd ~/.dsh/profiles/web
pnpm add dsh-hero-theme

Add "dsh-hero-theme" to dsh.profile.bundles in the package.json of the same profile, then restart that profile.

Typical Usage

  1. Complete installation and restart the profile as in the previous section.
  2. Open Settings → General → HeroUI theme.
  3. Select the accent color on the color sliders or color wheel panel; adjust Base chroma, font, Radius/Radius Form, Theme presets, and Light/Dark/System as needed.
  4. Observe the instant changes in the interface; once satisfied, no extra export step is needed, and the configuration will be written to the Cordis patch. If you want to go back to the factory builder defaults, click Reset.

After the above steps, you can quickly align the HeroUI brand colors and radius system in a local development environment without writing hundreds of CSS variables manually.

Suitable Scenarios and Notes

  • Suitable: Developers and personal users who want to unify the HeroUI visual style in DSH Web/Desktop, need one-click brand presets or multiple sets of accent experiments.
  • Not Suitable: Scenarios where you don’t intend to introduce HeroUI geometry and animations, and only need to change one or two colors—the modification scope will cover a relatively complete token layer.
  • Dependencies: Peer dependencies include React ^18.2, Cordis ^4.1, and multiple @deepseek-ai/dsh-client-* / @deepseek-ai/dsh-settings (version constraints see npm package.json).
  • Ecosystem Explanation: DSH follows the “everything is a plugin” philosophy; SkillHub Plugin Directory is a community site and has no official affiliation with DeepSeek / QuantCube.

Conclusion

dsh-hero-theme connects the HeroUI v3 theme builder controls and formulas to the DSH token layer, completing a “fun outfit” level of deep skinning with seven real-time controls and 11 presets, while maintaining an editing experience without rebuilds or profile restarts. For further information, you can visit the directory page skillhub.cn/plugins/Lhy723/dsh-hero-theme and the repository github.com/Lhy723/dsh-hero-theme.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye