color-tokens
Generate accessible color tokens from a single accent color. Use when user wants to create or update color palettes, check accessibility contrast, or generate warm/cool adaptive gray scales.
When & Why to Use This Skill
This Claude skill automates the creation of accessible design systems by generating a comprehensive set of color tokens from a single accent color. It streamlines the UI/UX workflow by producing harmonized adaptive gray scales and high-contrast text colors that follow the 'Less, but better' philosophy, ensuring WCAG and APCA accessibility compliance while providing ready-to-use CSS custom properties.
Use Cases
- Design System Kickstart: Rapidly generate a full, harmonized color palette for a new project starting from just one brand accent color.
- Accessibility Auditing: Update existing web applications to meet modern contrast standards (APCA) by regenerating text and background tokens for optimal readability.
- Thematic UI Scaling: Create sophisticated neutral scales (warm, cool, or neutral) that automatically adapt to the primary brand color for a more cohesive visual identity.
- Frontend Development Efficiency: Directly generate and export CSS custom properties to style sheets, reducing manual color picking and ensuring design-to-code consistency.
| name | color-tokens |
|---|---|
| description | Generate accessible color tokens from a single accent color. Use when user wants to create or update color palettes, check accessibility contrast, or generate warm/cool adaptive gray scales. |
| allowed-tools | Read, Write, Edit, Bash |
Generate Color Tokens
Generate accessible color tokens from a single accent color following Dieter Rams' "Less, but better" philosophy.
Usage
- Ask user for the accent color (hex format, e.g.,
#ed8008) - Run:
node .claude/skills/color-tokens/generate.js "#hexcolor" - Review output with user
- Update
src/styles/tokens.csswith new values
What It Generates
- 10 adaptive grays that harmonize with the accent (warm/cool/neutral)
- Accessible text color for the accent (light or dark based on APCA contrast)
- CSS custom properties ready to paste
- Accessibility contrast checks
Example
node .claude/skills/color-tokens/generate.js "#ed8008"