TYEclipse/dsh-color0

dsh-color

Color conversion toolbox for DeepSeek Harness (dsh): parse and convert any CSS color (hex / rgb / hsl / hwb / named), WCAG contrast ratios with AA/AAA verdicts, and named-color lookup — zero runtime dependencies, pure math

AI 分析

核心用途是提供精确的颜色空间转换与无障碍对比度校验。适合前端开发者、UI/UX 设计师进行界面配色和无障碍标准合规性检查。

パッケージ
dsh-color
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/16

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TYEclipse/dsh-color

ドキュメント

README 全文を読む ↗

Usage examples

convert_color("rebeccapurple")
  → hex #663399, rgb(102, 51, 153), hsl(270, 50%, 40%), hwb(270 20% 40%)

convert_color("#ff000080", format: "hex")
  → #ff000080 (alpha preserved)

contrast_ratio("#777777", "#ffffff")
  → ratio 4.48 — fail for normal text, AA for large text

contrast_ratio("white", "hsl(0, 100%, 50%)")
  → ratio 4.0 — AA for large text only

color_info(query: "blue", limit: 5)
  → blue #0000ff, blueviolet #8a2be2, cadetblue #5f9ea0, …

color_info(query: "#00ffff", by: "value")
  → aqua, cyan (both map to #00ffff)