Skip to content

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.

Ask: “Make a palette for brand color #3b82f6, with a dark mode, as a Tailwind theme.” The skill steers the agent through these calls:

Terminal window
color-map palette '#3b82f6' # roles, text colors and ratios
color-map palette '#3b82f6' --mode dark
color-map export '#3b82f6' --source palette --to tailwind > theme.css
color-map export '#3b82f6' --source palette --to tailwind --mode dark > theme-dark.css

The 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.

  • 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 oklch or --format json for precision.
  • A coded error names the input to fix; retrying the same call cannot help.

The plugin version follows the package version.