Preface

When developing agents based on DeepSeek Harness (DSH), you may often encounter scenarios that require handling color formats, calculating contrast, or generating color schemes. Having a large language model output RGB values directly is often imprecise, or requires manually writing conversion logic. The DSH plugin ecosystem provides a practical solution for this.

Plugin Overview

dsh-color is a DSH client plugin maintained by user uckkk. It is implemented in pure Node.js and focused on color processing.

Core Features

This plugin provides the following capabilities:

  • Color format conversion: Supports mutual conversion between Hex, RGB, and HSL formats.
  • Helper calculations: Provides complementary color calculation, lightness/darkness calculation, and foreground text contrast calculation.

Installation and Activation

Install the plugin using the DSH CLI.

  1. Run the installation command:
    dsh plugin add dsh-color
Or install it from the GitHub repository:
    dsh plugin add github:uckkk/dsh-color
  1. After installation, configure dsh.profile.bundles in the package.json file under your project’s profile directory. Add the "dsh-color" field to the configuration file to load it into the runtime environment.

Typical Usage

Once installed, you can call the tools registered by the plugin from a DSH session. For example, query the RGB and HSL values of a Hex color and get a recommended foreground text color:

这个颜色 #3b82f6 的 rgb 和 hsl 是什么,配什么文字颜色
→ 调用 color_convert(color="#3b82f6")

Applicable Scenarios and Notes

  • Applicable scenarios: This plugin is suitable for agent development that requires generating highly readable UI color schemes or performing precise color value calculations.
  • Security note: Installing the plugin runs third-party code on your local machine. Please review the source code yourself (GitHub repository).
  • Dependency requirements: The plugin depends on @deepseek-ai/cordis (>= 4.0.1) and @deepseek-ai/dsh-tools (>= 0.1.0-rc.6).

Summary

dsh-color encapsulates pure Node.js calculation logic and provides precise color-processing capabilities for DSH. Developers can call its interfaces directly during agent development without reinventing the wheel. For more details, see the SkillHub directory or the GitHub repository.