Agent skill
The color-map skill ships inside the color-map package as a plugin for Claude Code, Cursor, Codex and GitHub Copilot CLI (plugin.json and skills/color-map/SKILL.md in the package). It tells an agent to call the color-map command instead of doing color math by hand.
One prompt to a valid palette
Section titled “One prompt to a valid palette”Ask: “Make a palette for brand color #3b82f6, with a dark mode, as a Tailwind theme.” The skill steers the agent through these calls:
color-map palette '#3b82f6' # roles, text colors and ratioscolor-map palette '#3b82f6' --mode darkcolor-map export '#3b82f6' --source palette --to tailwind > theme.csscolor-map export '#3b82f6' --source palette --to tailwind --mode dark > theme-dark.cssThe agent reads failing and issues in the first answer. failing: 0 means every pair meets its target. If not, it changes --target or the brand color and runs the command again; it does not edit hex values by hand.
Rules the skill gives the agent
Section titled “Rules the skill gives the agent”- Contrast is WCAG 2; the CLI has no other contrast algorithm.
- Pass colors as given and do not round-trip them through hex; use
--to oklchor--format jsonfor precision. - A coded error names the input to fix; retrying the same call cannot help.
The plugin version follows the package version.