Skip to content
color-tools logo

Color Tools Skill

color-tools

Color palette generation, contrast checking (WCAG), color space conversion, and color harmony tools. Ensures accessible and visually appealing color systems. Use when designing color schemes, checking accessibility, or creating design tokens.

SKILL.md

Full skill instructions

Color Tools Skill

This skill helps you create accessible, harmonious color palettes and ensures your colors meet WCAG contrast requirements. I provide color calculations, palette generation, and accessibility validation.

What I Can Do

Color Contrast Checking

  • Calculate contrast ratios
  • Verify WCAG AA/​AAA compliance
  • Suggest accessible alternatives
  • Check text/​background combinations

Palette Generation

  • Create tint/​shade scales (50-900)
  • Generate color harmonies
  • Build complementary palettes
  • Design theme variations

Color Conversions

  • HEX ↔ RGB ↔ HSL
  • Calculate opacity variations
  • Generate CSS custom properties
  • Create color tokens

Accessibility Tools

  • Find accessible color pairs
  • Suggest minimum contrast fixes
  • Validate interactive state colors
  • Check large text requirements

WCAG Contrast Requirements

Minimum Ratios

  • Normal text: 4.5:1 (AA), 7:1 (AAA)
  • Large text (18px+ or 14px+ bold): 3:1 (AA), 4.5:1 (AAA)
  • UI components: 3:1 (AA)
  • Graphical objects: 3:1 (AA)

Contrast Formula

Contrast Ratio = (L1 + 0.05) / (L2 + 0.05) Where L1 is lighter color luminance and L2 is darker

Example: Contrast Checking

You: "Check if #3b82f6 on white background is accessible"

I'll provide:

Color: #3b82f6 (Blue)
Background: #ffffff (White)

Contrast Ratio: 4.52:1

WCAG Compliance:
✓ Normal text AA (4.5:1 required) - PASS
✗ Normal text AAA (7:1 required) - FAIL
✓ Large text AA (3:1 required) - PASS
✓ Large text AAA (4.5:1 required) - PASS
✓ UI Components (3:1 required) - PASS

Recommendation:
For AAA compliance with normal text, use #2563eb (darker blue)
New contrast: 7.02:1 - Passes all requirements

Palette Generation

Tint & Shade Scale

/​* Generate 50-900 scale from base color */
:root {
  /​* Base color: #3b82f6 */

  --color-blue-50: #eff6ff;   /​* 90% lighter */
  --color-blue-100: #dbeafe;  /​* 80% lighter */
  --color-blue-200: #bfdbfe;  /​* 60% lighter */
  --color-blue-300: #93c5fd;  /​* 40% lighter */
  --color-blue-400: #60a5fa;  /​* 20% lighter */
  --color-blue-500: #3b82f6;  /​* Base */
  --color-blue-600: #2563eb;  /​* 20% darker */
  --color-blue-700: #1d4ed8;  /​* 40% darker */
  --color-blue-800: #1e40af;  /​* 60% darker */
  --color-blue-900: #1e3a8a;  /​* 80% darker */
}

/​* Usage guide:
 * 50-100: Backgrounds, subtle highlights
 * 200-300: Hover states, borders
 * 400-600: Primary UI, text on light backgrounds
 * 700-900: Text, emphasis, dark themes
 */

Color Harmonies

Complementary Colors
/​* Base: #3b82f6 (Blue) */
:root {
  --color-primary: #3b82f6;      /​* Blue (210°) */
  --color-complement: #f6823b;   /​* Orange (30°) - opposite */
}
Analogous Colors
/​* Base: #3b82f6 (Blue) */
:root {
  --color-primary: #3b82f6;      /​* Blue (210°) */
  --color-analogous-1: #3bf6db;  /​* Cyan (180°) */
  --color-analogous-2: #823bf6;  /​* Purple (270°) */
}
Triadic Colors
/​* Base: #3b82f6 (Blue) */
:root {
  --color-primary: #3b82f6;      /​* Blue (210°) */
  --color-triadic-1: #f6db3b;    /​* Yellow (90°) */
  --color-triadic-2: #db3bf6;    /​* Magenta (330°) */
}
Split-Complementary
/​* Base: #3b82f6 (Blue) */
:root {
  --color-primary: #3b82f6;      /​* Blue (210°) */
  --color-split-1: #f6db3b;      /​* Yellow-Orange (45°) */
  --color-split-2: #f6493b;      /​* Red-Orange (15°) */
}

Accessible Color Palettes

Light Theme

:root {
  /​* Backgrounds - Lightest colors */
  --color-bg: #ffffff;           /​* Pure white */
  --color-bg-secondary: #f9fafb; /​* Near white */
  --color-bg-tertiary: #f3f4f6;  /​* Light gray */

  /​* Text - Darkest colors (AAA contrast) */
  --color-text-primary: #111827;   /​* 16.04:1 */
  --color-text-secondary: #4b5563; /​* 8.49:1 */
  --color-text-tertiary: #6b7280;  /​* 5.77:1 */

  /​* Primary color (accessible) */
  --color-primary: #2563eb;      /​* 7.02:1 on white */
  --color-primary-hover: #1d4ed8; /​* 9.52:1 on white */

  /​* Interactive states */
  --color-link: #2563eb;         /​* 7.02:1 */
  --color-link-hover: #1d4ed8;   /​* 9.52:1 */
  --color-link-visited: #7c3aed; /​* 7.09:1 */

  /​* Status colors (all AAA compliant) */
  --color-success: #047857;      /​* 7.36:1 */
  --color-warning: #b45309;      /​* 7.01:1 */
  --color-error: #dc2626;        /​* 7.29:1 */
}

Dark Theme

[data-theme="dark"] {
  /​* Backgrounds - Darkest colors */
  --color-bg: #111827;           /​* Very dark gray */
  --color-bg-secondary: #1f2937; /​* Dark gray */
  --color-bg-tertiary: #374151;  /​* Medium-dark gray */

  /​* Text - Lightest colors (AAA contrast) */
  --color-text-primary: #f9fafb;   /​* 14.73:1 */
  --color-text-secondary: #d1d5db; /​* 10.31:1 */
  --color-text-tertiary: #9ca3af;  /​* 6.16:1 */

  /​* Primary color (lighter for dark mode) */
  --color-primary: #60a5fa;      /​* 7.38:1 on dark bg */
  --color-primary-hover: #93c5fd; /​* 10.73:1 on dark bg */

  /​* Status colors (adjusted for dark mode) */
  --color-success: #34d399;      /​* 7.53:1 */
  --color-warning: #fbbf24;      /​* 13.44:1 */
  --color-error: #f87171;        /​* 7.03:1 */
}

Color Conversion Examples

HEX to RGB

#3b82f6 → rgb(59, 130, 246)

Calculation:
R: 3b (hex) = 59 (decimal)
G: 82 (hex) = 130 (decimal)
B: f6 (hex) = 246 (decimal)

RGB to HSL

rgb(59, 130, 246) → hsl(217, 91%, 60%)

Calculation:
H: 217° (hue)
S: 91% (saturation)
L: 60% (lightness)

Adding Opacity

/​* HEX with alpha */
--color-primary: #3b82f6;
--color-primary-10: #3b82f61a; /​* 10% opacity */
--color-primary-50: #3b82f680; /​* 50% opacity */

/​* RGB with alpha */
--color-primary-rgb: 59, 130, 246;
--color-primary-10: rgba(var(--color-primary-rgb), 0.1);
--color-primary-50: rgba(var(--color-primary-rgb), 0.5);

/​* HSL with alpha */
--color-primary: hsl(217, 91%, 60%);
--color-primary-10: hsl(217, 91%, 60%, 0.1);
--color-primary-50: hsl(217, 91%, 60%, 0.5);

Color Token System

Complete Token Architecture

:root {
  /​* 1. Global tokens - Raw colors */
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-gray-50: #f9fafb;
  --color-gray-900: #111827;

  /​* 2. Semantic tokens - Purpose */
  --color-primary: var(--color-blue-600);
  --color-text-primary: var(--color-gray-900);
  --color-surface: var(--color-gray-50);

  /​* 3. Component tokens - Specific */
  --button-bg-primary: var(--color-primary);
  --button-text-primary: white;
  --card-bg: var(--color-surface);
}

Checking Interactive States

Button States Example

.button-primary {
  /​* Default state */
  background: #2563eb;  /​* 7.02:1 on white */
  color: white;

  /​* Hover state */
  &:hover {
    background: #1d4ed8; /​* 9.52:1 on white */
  }

  /​* Focus state */
  &:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    /​* Outline must have 3:1 contrast with adjacent colors */
  }

  /​* Active/​pressed state */
  &:active {
    background: #1e40af; /​* 11.19:1 on white */
  }

  /​* Disabled state */
  &:disabled {
    background: #93c5fd; /​* 3.24:1 - may fail for text */
    color: #6b7280;     /​* Reduced contrast acceptable when disabled */
    opacity: 0.6;
  }
}

Color Accessibility Tips

✓ Good Practices

  • Test all text/​background combinations
  • Check hover and focus states
  • Verify status colors (success, warning, error)
  • Don't rely on color alone (use icons/​text too)
  • Test with color blindness simulators
  • Provide high contrast mode
  • Use semantic color names

❌ Common Mistakes

  • Light gray text on white (#999 on #fff = 2.85:1 - fails)
  • Relying only on color for information
  • Insufficient contrast in disabled states
  • Forgetting to test dark mode
  • Not checking focus indicators
  • Ignoring links and interactive elements

Example Usage

You: "Create an accessible blue palette for a light theme"

I'll provide:

:root {
  /​* Blue palette - All colors tested for accessibility */

  /​* Primary actions - AAA compliant on white */
  --color-primary: #1d4ed8;      /​* 9.52:1 */
  --color-primary-hover: #1e40af; /​* 11.19:1 */

  /​* Backgrounds */
  --color-primary-bg: #eff6ff;   /​* Subtle background */
  --color-primary-border: #93c5fd; /​* 3.24:1 - good for borders */

  /​* Text on primary buttons */
  --color-primary-text: #ffffff; /​* 9.52:1 on #1d4ed8 */

  /​* Links */
  --color-link: #2563eb;         /​* 7.02:1 - AAA for large text */
  --color-link-hover: #1d4ed8;   /​* 9.52:1 - AAA */
  --color-link-visited: #7c3aed; /​* 7.09:1 - AAA */

  /​* Status indicators */
  --color-info: #0284c7;         /​* 7.24:1 */
  --color-info-bg: #e0f2fe;      /​* Background for info messages */
}

/​* Usage example */
.button-primary {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.button-primary:hover {
  background: var(--color-primary-hover);
}

.link {
  color: var(--color-link);
}

.link:hover {
  color: var(--color-link-hover);
}

Just Ask!

Tell me what you need:

  • "Check contrast for #3b82f6 on white"
  • "Generate a blue color palette"
  • "Create accessible dark theme colors"
  • "Find a complementary color for #2563eb"
  • "Make this color more accessible"
  • "Convert #3b82f6 to RGB and HSL"

I'll help you create accessible, beautiful color systems!

More Design skills

brandkit logo
Design

brandkit

Premium brand-kit image generation for high-end identity systems, logo concepts, and visual-world presentations.

92.7K 345.8K
View

Premium website design-to-code skill that generates visual references first, then builds faithful frontend implementations.

92.7K 341.7K
View

Premium frontend image direction for landing pages and marketing sites, generating one distinct horizontal image per section.

92.7K 337.8K
View

Premium mobile app screen concepts and flows with clean hierarchy, strong imagery, and distinctive art direction.

92.7K 331.8K
View

Emil Kowalski's philosophy on UI polish, component design, and the invisible details that make software feel good.

43.5K 323.4K
View

Frontend design and iteration for production-grade interfaces, from concept to ship.

76.8K 313.3K
View

Reverse-engineer design tokens from public websites into starter token files for your project.

232 129.9K
View
Animate logo
Design

Animate

Builds an animation from scratch by making the decisions in the order that determines whether it feels right.

43.5K 117.9K
View

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

179.7K 114.2K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

Design AI tools

Maze Guru logo
Images

Maze Guru

Chat-to-edit AI studio for product photos, portraits, branding, and video.

Freemium
View
R
Design

RoomGPT

Generate your dream room in seconds.

Paid
View

Redesign your interior in seconds using AI

Paid
View
Reroom logo
Design

Reroom

Transform rooms with AI-generated designs.

Freemium
View
Jife logo
Design

Jife

Transform Your Space with AI-Powered Japanese Interior Designs by Jife

Paid
View
Visily logo
Design

Visily

AI-powered wireframes for non-designers.

Free
View

Revolutionize Property Viewing with AI-Generated Floor Plans and Virtual Tours

Paid
View
Archsynth logo
Design

Archsynth

Transform sketches into stunning architectural renders with AI.

Paid
View