Skip to content

Releases: TYEclipse/dsh-color

dsh-color v0.2.0

Choose a tag to compare

@TYEclipse TYEclipse released this 26 Aug 21:50

✨ What's New

Two new pure-math tools (now 5 tools total, 73 tests):

color_scheme — harmonious palette generation

Generate palettes from any base color: complementary, analogous (3/5 colors), triadic, split-complementary, tetradic, square, monochromatic (2–9 shades). Every color returned as hex + rgb() + hsl(). Rotation harmonies keep base saturation/lightness with canonical hue offsets; monochromatic steps lightness evenly around the base.

adjust_color — color adjustments

lighten / darken / saturate / desaturate by percentage points, or hue rotate by degrees (any sign). Gray + saturate is a no-op (CSS filter semantics). Result as hex + rgb() + hsl().

🔧 Fix

Channel serialization now rounds half-up with a floating-point dust guard, matching CSS serialization (e.g. hsl(210, 100%, 50%)rgb(0, 128, 255)).

中文摘要

新增两个纯数学工具(共 5 个工具,73 项测试全绿):color_scheme 由基色生成和谐配色(互补/类似/三角/分裂互补/四角/方形/单色 7 类);adjust_color 调整颜色(变亮/变暗/加饱和/去饱和/色相旋转)。通道序列化改为与 CSS 一致的「四舍五入进位 + 浮点尘埃防护」。

Install: dsh plugin --profile <name> add github:TYEclipse/dsh-color

v0.1.0

Choose a tag to compare

@TYEclipse TYEclipse released this 20 Aug 16:15

dsh-color v0.1.0

颜色转换工具箱 Color conversion toolbox — 首发版本(历史发布补账 / historical release backfill)。

工具 Tools

  • convert_color — 任意 CSS 颜色 → hex / rgb / hsl / hwb(148 命名色、逗号+空格语法、角度单位)
  • contrast_ratio — WCAG 2.x 对比度 + AA / AAA 判定
  • color_info — 命名色按名 / 按值查询

安装 Install

dsh plugin --profile <name> add github:TYEclipse/dsh-color

零运行时依赖(zero runtime dependencies,纯算术)。