跳到正文
Skillpedia
界面(UI/UX)56k · #3286

shade-tokens-not-hex

它能做什么

这个技能告诉 AI 智能体从 Shade 的命名令牌中为界面选择颜色,而不是使用固定的颜色代码。适合希望其界面与 Ghost 设计保持一致的开发者。

适用场景

  • ✓当你为背景、文字、边框或悬停状态选择颜色的时候。
  • ✓当你在审查界面中是否有硬编码的颜色值的时候。
  • ✓当你需要某种标准令牌无法覆盖的颜色的时候。

技能链接

https://github.com/TryGhost/Ghost/blob/main/apps/shade/skills/shade-tokens-not-hex/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/TryGhost/Ghost/blob/main/apps/shade/skills/shade-tokens-not-hex/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我为 Ghost 应用中卡片的背景和边框上色,并使用正确的设计令牌。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会说明每种颜色的用途,查找对应的语义令牌,并以文档所示的形式写入。只有在文档允许的情况下,才会使用原始令牌。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Shade tokens, not hex

Every colour on a Ghost screen comes from a Shade token. The rules live in Tokens.

Docs links use https://shade.ghost.org. If the project's AGENTS.md says where Shade's docs are (another address, or a source folder), use that instead. Fetch web pages with curl -s.

Workflow

  1. Name the job of each colour you're about to write: canvas, surface, floating menu, text, border, form control, hover, destructive or focus.
  2. Look the job up in Common semantic tokens. Choose between close candidates with Surface elevation, Interactive surfaces and Form control borders.
  3. Write it the way Rules of consumption shows, in classes and in stylesheets.
  4. When no semantic token fits, Two flavours and Source files say what to use instead.

Self-check

  • Every colour, border and hover in your diff is a semantic token, or a raw token for a case the docs allow.
  • The screen looks right in both light and dark mode. For any dark: class, run shade-no-dark-variants.
常见问题

为什么要使用令牌而不是十六进制代码?

令牌能让颜色在整个设计系统中保持一致,而且语义令牌还会随当前主题自动调整。

如果没有合适的令牌怎么办?

文档说明了在这种情况下如何使用另一种令牌或源文件。

它如何检查我的工作?

它的自检要求你的改动中每种颜色都是语义令牌,或是文档允许的原始令牌。

详情

作者的原始描述

Colour Ghost UI with Shade's semantic tokens. Use when choosing colours or styling UI, including surfaces, text, borders and hover states.

repo: TryGhost/Ghost

热度

GitHub 星标
56k
排名
#3286
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能