Colorize

educlopez/ui-craft/.agents/skills/colorize

作者 educlopezceecc8e1fb0c2befda73da996435900d6dd0c1ac无许可证375 个星标收录于 2026年10月9日更新于 2026年10月9日仓库5周前更新

Color strategy pass — introduces a single accent at 3-5 intentional placements, or reduces an over-colored UI back to 90% neutral. Use when the UI has no color identity, uses blue by default, or is shouting with too many competing accents. Invoke when the user asks for colorize on their UI, or mentions 'colorize' alongside design / UI / frontend work.

仅含说明Design & Creative
AI 生成的概览

为界面应用克制的配色策略:单一强调色用于 3-5 处,或将过度用色的界面收敛为以中性色为主。

功能
这是一个面向前端界面设计的配色视角,用于增加或减少颜色。它遵循 90% 以上中性表面、单一强调色、每个视口 3-5 处有意使用的规则,优先使用品牌色或提供 OKLCH 强调色选项,而不是默认使用蓝色。它也处理相反情况,将相互竞争的强调色削减到 1-3 个,去除装饰性颜色并保留语义状态色。它直接修改代码,把字面十六进制值提升为 CSS 变量,并输出带对比度检查的评审表格。
适用场景
适用于界面缺乏色彩识别、默认使用蓝色,或因过多强调色而显得杂乱的情况。当用户要求对界面进行配色,或在设计、界面、前端工作中提到 colorize 时使用。
运行要求
需要智能体直接编辑前端代码;会引用 ui-craft 技能及其配色与无障碍参考文档。不附带脚本。
<!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. -->

Context: this sub-skill is one lens of the broader ui-craft skill. If the ui-craft skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below.

Add color to the UI at $ARGUMENTS. Load the ui-craft skill.

The rule (from SKILL.md): 90%+ neutral, one accent, 3-5 placements per viewport. Reinforce this before adding anything. More color is not more design.

Before you touch anything — ask about brand. If a brand color exists, use it. If not, offer 2-3 options in OKLCH — include one warm (e.g., oklch(0.67 0.19 45)) and one cool (e.g., oklch(0.60 0.18 250)). Never default to blue.

Where color EARNS its place:

  • Primary CTA background.
  • One key metric tint — accent at ~8% opacity as a subtle background, accent at full strength on the number itself.
  • Active state of the current nav item (underline, dot, or subtle tint — pick one).
  • Status dots (success / warning / danger), 6-8px, no pills.
  • Focus ring (:focus-visible).

Where color does NOT go (anti-slop territory):

  • Heading gradient text.
  • Colored left or top borders on every card.
  • Uniform chips on every tag/label.
  • Emoji-as-icons to inject "color."
  • Trend arrows in green/red when a plain ↑/↓ + tabular-nums would read cleaner.

Knob gating (VISUAL_DENSITY):

  • ≤ 4 → single accent only, max 3 placements.
  • 5-7 → single accent, 3-5 placements, status dots allowed.
  • 8+ → semantic palette (success/warning/danger) allowed beyond the single accent — dashboards and data UIs earn this.

Over-colored? Reduce.

If the UI is already shouting with color, this command also removes color.

  1. Count accents per viewport. Cut to 1-3. The primary CTA keeps its accent; everything else goes neutral unless it's a true semantic state (success/warning/danger on a real status).
  2. Mute decorative color. Background patterns, tinted cards without meaning, colored left borders on every list item, heading gradients, colored pills on every tag → gone.
  3. Keep semantic, cut decorative. Status dots, focus rings, active-nav underlines stay. Color as ornament goes.

References to read: references/color.md (OKLCH, tokens, dark mode, contrast), references/accessibility.md (contrast ratios for AA/AAA).

Output: edit code directly. Lift any literal hex into CSS variables (--color-accent, --color-accent-tint) — respect existing token naming if present. Print the Review Format table. One row per placement, with the ratio check (AA/AAA) on text uses.

Next step: /tokens — promote the color decisions into the durable token spine so they survive the session (rung 2).

来源与署名

来源:educlopez/ui-craft位于.agents/skills/colorize提交ceecc8e

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架