主题配色锻造

SKILL开发
开发 未标注权限 许可证不明确
安装这个技能

网页主题换色与配色无障碍校验技能。当用户要把现有 HTML/CSS 页面换成新配色、按截图还原品牌色、生成一套配色 token 主题、切换深浅两套色板、或检查配色对比度是否达标时使用此技能。解决全局替换会破坏的三类问题:颜色词残留在 class 名里、颜色藏在渐变字符串和亮色模式覆盖里、以及亮色渐变上的按钮文字需要反色。内置三个脚本:从截图逐像素取色(自动定位控件区域、报告抗锯齿边缘的主色)、WCAG 对比度实测(支持渐变逐端点、半透明色混合、深浅两套批量审计)、调色板校验(查残留色、未填占位符、失效类名、未定义变量)。触发词:换配色、换色系、改主题色、按这张图取色、做成截图里的颜色、深色模式、浅色模式、对比度、配色检查、token 主题、recolor、palette、contrast、theme。

一句话选型结论

按资料字段整理

主题配色锻造是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_f4c201a0/theme-forge
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_f4c201a0仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-11-06上游最后核验时间 · 数据更新 2026-11-06
正文体量8.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
主题配色锻造当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

8.3 KB
模型实际读到的说明书原文,来自技能仓库

Theme Forge

Recolouring a page looks like find-and-replace and is not. The colour values are
easy. The failure modes are where the damage happens, and each one has been
learned the expensive way.

When to use

  • "把页面换成绿色系" / "change this page's colours"
  • "做成和这张截图一样的配色"
  • "抽一下这张图的色板"
  • "深色和浅色模式都得能看"
  • "检查这套配色有没有对比度问题"
  • Building a token file (CSS variables, Tailwind config, SCSS) from a palette

Core workflow

1. Never eyeball a palette

If the source is a screenshot, image, or design file, sample it:

python3 scripts/screenshot_palette.py shot.png

Reports the saturated region, the per-control colour ramp, the dominant
endpoint colours, and the glyph colour. The first and last sampled pixels sit
on an antialiased edge, so the script also reports the dominant colour per
end — use that, not the literal endpoint.

If the source is prose ("make it feel like X"), invent the palette, then verify
it with the contrast script before writing any CSS.

2. Decide what each colour is FOR, not just what it looks like

This is the part that gets skipped and the reason recolours break. A single
gradient variable rarely survives contact with a new palette. Split by role:

Role Requirement Typical use
--grad-ink readable as text on the page background headings, gradient text
--grad-solid dark enough for a white or dark label to sit on it CTA buttons, icon fills
--grad-lime decoration only, no contrast requirement accents, borders, glows
--on-accent the label colour that goes on --grad-solid button text, chevrons

The original palette may have needed only one gradient because both ends
happened to work for every role. A new palette often cannot do both. If
--grad-ink is a light gradient, the label colour and the light-mode override
both need attention (see step 4).

3. Recolour structurally, not globally

A blind global replace of the old hex values misses three things and breaks two:

Misses
1. Light-mode background — #F4F2FB never appears in dark-theme rules, so
a replace targeting dark values leaves the old tint behind.
2. Values inside gradient strings — linear-gradient(180deg,#0F1024,#070814)
holds two colours the token scan never sees.
3. Copy that names the colour — "Added a violet to pink hero" next to a
green UI is worse than a missing style.

Breaks
4. ("var(--grad-cyan)", "var(--grad-lime)") changes the CSS value but leaves
the class name .gradient-text-cyan intact. Rename classes separately.
5. Structural colours get caught: macOS window dots, a status pip, error-state
red. These are not theme colours.

Best practice: convert the page to token placeholders once, then fill them per
scheme. Structure changes happen in the placeholder pass and are never repeated:

reference.html  --normalise-->  template.html  --scheme-->  page.html
                    (once)          (reusable)      (per palette)

4. The light-mode override is not optional

A gradient that is perfectly legible on a dark background can be invisible
on white. Measure it:

python3 scripts/contrast.py --label "#46F8A0" --bg "#F2FAF7"
# 1.30:1  FAIL

The rule that follows: a light gradient is fine as a block, never as text on
a light background.
Either deepen it for the light theme, or keep the light
gradient only for filled surfaces and reserve a darker variant for text.

[data-theme="light"] {
  --grad-ink:   linear-gradient(120deg, #0B7A55 0%, #096B7A 100%); /* 5.04 / 5.83:1 */
  --accent:     #0B7683;                                          /* 5.03:1 */
  /* --grad-solid intentionally NOT overridden:
     a bright gradient with a dark label reads fine on white, 12.71 / 10.82:1 */
}

5. Measure, never estimate

Every contrast figure in a deliverable must come from the script. Estimates are
consistently pessimistic and shipping them puts unverifiable numbers in front of
the user.

# label against each gradient stop
python3 scripts/contrast.py --label "#061D17" --gradient "#46F8A0,#0FE0F0"

# translucent text, flattened against its background
python3 scripts/contrast.py --label "#EAFBF7" --bg "#04120F" --alpha 0.72

# a whole dark/light token pair at once
python3 scripts/contrast.py --audit tokens-audit.json

Thresholds: 4.5 for body text, 3.0 for large text and non-text (icons, borders,
pips). All three exit non-zero on failure, so they gate a build.

6. Lint the result

# trust the file's own colours, flag leftovers from a previous theme
python3 scripts/token_lint.py page.html --palette auto \
  --foreign "#7C3AED,#EC4899,#06B6D4" --no-dashes

# or check against a known palette file
python3 scripts/token_lint.py page.html --palette my-palette.json

Catches unfilled @TOKEN@ placeholders, foreign colours, stale colour words in
selectors, and CSS custom properties that are referenced but never defined.

Two subtleties it handles, both of which produce false alarms otherwise:
- Token blocks mix #04120F and rgba(70,248,160,.2). Matching only hex
literals silently drops half the palette and reports it back as foreign.
- Colour words in prose are legitimate ("a mint to cyan hero"). Only class
names and CSS selectors are checked.

7. Keep the content self-consistent

After a palette change, grep for text that names the old colours and for
hardcoded values inside illustrative code blocks, mockups, and screenshots
rendered in CSS. A product mockup showing from="#7C3AED" in a green page
reads as broken.

Anti-patterns

Do not Do instead
Estimate contrast Run contrast.py, quote the output
One gradient variable for every role Split --grad-ink / --grad-solid / --grad-lime
Global find-and-replace Normalise to placeholders once, then fill per scheme
Hardcode label colour as white Add an --on-accent token
Only recolour dark mode Always write the light override, then measure it
Trust class names after a value rename Rename classes explicitly
Assume a rename hit Assert on every replacement; print misses

Delivering

Ship a token file the user can paste into their own project, not just a rendered
page. Include:

  • both light and dark blocks
  • RGB triples when the consumer writes rgba(var(--theme-rgb-mint), .4)
  • the measured contrast table, clearly labelled as measured
  • one note on anything that differs between modes and why

Reference files:
- references/palette-recipes.md — ready-made palettes with measured contrast
- references/recolour-traps.md — the full failure catalogue with fixes

Portability

The scripts need only Python 3 and Pillow (Pillow only for
screenshot_palette.py). Paths in SKILL.md are relative to this skill
directory; run them from there or pass absolute paths.

常见问题

5 问
答案由本站依据条目字段整理
主题配色锻造怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_f4c201a0/theme-forge。安装方式为未标注。装完刷新技能列表或重开客户端。

主题配色锻造支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

主题配色锻造权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

主题配色锻造收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

主题配色锻造用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-11-06。