
ColorwayKit
io.github.5zjk5由 GitHub 账号 5zjk5 发布v1.0.0更新于 Oct 24, 2026
Verified color tokens for AI coding agents: one brand hex in, WCAG/APCA-measured themes out.
概览
ColorwayKit 把一个品牌十六进制色生成经过验证的明暗配色主题,让助手产出带实测对比度的颜色令牌并检查配色对。
- 可以做什么
- 由单个品牌色生成包含 23 个语义角色的完整明暗主题,并给出每对配色的 WCAG 2.1 与 APCA 对比度实测值。即时校验任意文字与背景配色对。读取已保存云端项目的主题,并按最新优先列出已保存项目。
- 适用场景
- 适合 AI 编码助手编写界面时需要一个统一且可访问的调色板、而不是自行臆造颜色的场景,也适合在开发中检查特定文字与背景配色对的对比度。
- 运行要求
- 通过 streamable HTTP 连接 colorwaykit.com 远程端点并使用 OAuth;需要 ColorwayKit 账户及生成的代理令牌,以 Authorization Bearer 请求头发送。按账户计量:免费版每天 5 次,Plus 每月 1,000 次,Pro 不限量。
安装
在 SourceWeft 中
- 打开 控制台中的 ColorwayKit,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.5zjk5%2Fcolorwaykit/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"colorwaykit": {
"type": "http",
"url": "https://www.colorwaykit.com/api/mcp"
}
}
}README
ColorwayKit for Agents
Give your AI coding agent a brand's color system it can actually follow.
[License: MIT] [Website] [MCP endpoint]
ColorwayKit turns one brand color into a complete, accessible light & dark web theme — 23 semantic roles, WCAG 2.1 + APCA contrast checks, and exports you can paste straight into a project.
- Website: https://www.colorwaykit.com
- Build a theme and export it: https://www.colorwaykit.com/brand
The problem this solves
Coding agents write working UI but invent colors: a blue button here, a different grey there, and a contrast ratio nobody checked. Re-describing your palette in every prompt doesn't scale.
DESIGN.md is an open format, adopted by AI coding tools, that puts a design system in one plain-text file: YAML design tokens (machine-readable values) plus a Markdown body (when and why to use them). Drop it in your project root and the agent reads it instead of guessing.
This repository collects the templates and an example we generate with ColorwayKit, so you can wire that file into the agents you already use.
Two ways to feed your agent
Both are free with a ColorwayKit account. Pick one, or use files as the versioned source and MCP as the live interface.
Option A: MCP server (live)
-
Create a free account at colorwaykit.com, then My Projects → Agent tab → Generate token.
-
Connect (Claude Code example):
-
Ask your agent: "list the color tokens for #4F46E5" — if it replies with named roles and measured contrast numbers, you are connected. Full setup for Cursor / Codex / Gemini CLI: https://www.colorwaykit.com/mcp
Tools: get_theme (one hex → full verified light & dark theme),
check_pair (validate any text/background pair on the fly),
get_theme_by_project (your saved cloud project),
list_projects (enumerate your saved projects, newest first).
Option B: the file way (quick start)
- Open the Brand Theme Engine and paste your brand hex (from your logo or guidelines).
- Go to the Take it to dev tab and copy or download
DESIGN.md. It is a free export format, alongside CSS variables, Tailwind config, Tokens Studio JSON and W3C DTCG tokens. - Save it as
DESIGN.mdin your project root. - Point your agent at it — see
templates/.
What the exported file contains
colorsin YAML front matter: semantic roles for both themes (primary,on-primary,surface,on-surface,outline,error, …), with dark-theme roles prefixeddark-.componentsthat reference those colors with{colors.x}syntax, so one change propagates.- A Markdown
Colorssection listing a measured result for every text/background pair: WCAG 2.1 ratio against its threshold, plus APCALcagainst the use-case threshold. Pairs that fail are marked as failing — the file reports what the tool computed, nothing more. typography,roundedandspacingare declaredomitted: the color engine has no measured values for them, so they stay with your framework's defaults rather than being invented.
See examples/DESIGN.md — generated from the brand color
#4F46E5 by ColorwayKit, not hand-written.
Templates
Each template only describes how to consume DESIGN.md. Copy one into your
project and adapt the paths. Every template now ships with an executable
verification step — see below.
Verify with the linter (CLI)
Keep new colors honest with the companion checker — wild-color scan plus WCAG 2.1 pair validation, exit codes for CI. It ships in this repo — runs with Node 18+, no install:
Exit 0 = clean; exit 1 = wild hex values or failing pairs. Add --apca to also
report APCA Lc per pair. Source lives in cli/ — wire it into a CI
step so new colors go through the file first.
Already have extracted colors?
If you came from a DevTools inspection or an extraction tool, your hex list has
no roles and no measurements yet. The migration guide walks it the last mile:
docs/migration-extracted-css.md — raw hex
→ semantic roles → measured pairs → a formal DESIGN.md, with a real worked
example (including a pair that genuinely fails).
FAQ
Where do the templates live? In this repository — free to copy. The DESIGN.md format itself is specified by Google Labs (Apache-2.0).
Do they work outside Claude Code? Yes. Templates are plain Markdown:
.cursorrules for Cursor, AGENTS.md for Codex and most agents, SKILL.md
for skill-aware clients.
Do I need both a skill and the MCP server? They compose. The file is the versioned contract your team ships; MCP is the live measurement tool that validates pairs and pulls freshly tuned themes on demand.
Is everything free? The templates, the Brand Theme Engine and the contrast checker are free. The MCP server is metered per account: Free 5 calls/day, Plus 1,000/month, Pro unlimited.
Notes and limits
- DESIGN.md is specified by Google Labs and licensed Apache-2.0 at google-labs-code/design.md. ColorwayKit is not the spec's author — we export to it.
- The specification is at an early version and describes parts of itself as evolving; component token structures may change.
- Contrast values are computed automatically and are a design reference, not a formal accessibility certification.
- The ColorwayKit engine covers color. Fonts, spacing and radii in the generated file are yours to define.
License
The templates and example in this repository are provided for practical use in your own projects. The DESIGN.md format itself is governed by its own specification and license (see the link above).
来源:README.md,提交 cdedeba
工具
0版本历史
1- v1.0.0最新Oct 14, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分