better-colors

Builds and audits color systems with ramps, semantic tokens, and measured contrast.

6.7k|239|Updated Jul 10, 2026
One-click install
npx skills add https://github.com/jakubkrehel/skills --skill better-colors-jakubkrehel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: better-colors
Source: https://github.com/jakubkrehel/skills/tree/main/skills/better-colors
Command: npx skills add https://github.com/jakubkrehel/skills --skill better-colors-jakubkrehel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Color bugs in interfaces are usually system bugs: values picked in isolation, tokens borrowed because they looked right, and contrast pairs nobody measured. This Skill turns ad-hoc color usage into a structured system of ramps, semantic tokens, and verified contrast pairs. ## Core Features & Use Cases - Palette generation and structure: Build neutral, accent, and status ramps with even perceived lightness, constant hue, and role-mapped steps following Tailwind or Radix conventions. - Token naming and theming: Separate primitive tokens from semantic role tokens so dark mode, white-label themes, and increased-contrast variants work without touching components. - Contrast measurement and format conversion: Measure foreground/background pairs against APCA or WCAG 2 thresholds, convert between hex, rgb, hsl, and oklch, and handle P3 gamut fallbacks. - Use Case: Audit an existing stylesheet, collapse near-duplicate colors into a single ramp, assign every survivor a semantic role token, and report each failing contrast pair with its measured value. ## Quick Start Ask the agent to audit the color system in your project and report any contrast, token, or palette issues it finds.

Frequently Asked Questions about better-colors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a color palette from a brand color?▼

Place the brand color on the solid-fill step (500 in Tailwind, 9 in Radix), then build the ramp with a color library like culori or chroma.js using perceptual interpolation. Keep hue constant, peak vividness mid-ramp, and space steps denser at the light end.

How do I check color contrast for accessibility?▼

Measure the foreground against the background it actually renders on, not the page background. Use APCA thresholds (Lc 75 for body text, Lc 60 for non-body) as the default, or WCAG 2 ratios (4.5:1 for normal text) when legal conformance is required.

Should I use oklch or hex for CSS colors?▼

Match whatever notation the project already uses, since consistency beats format purity. For a genuinely new color system, oklch is the best default because its lightness is perceptual and its hue stays stable across a ramp.

How do I name color design tokens for dark mode?▼

Use two tiers: primitives named by hue and step like --blue-500, and semantic tokens named by role like --color-text-secondary that point at primitives. Components reference only the semantic tier, so dark mode repoints semantics without touching components.

Why does my dark mode palette look wrong after reversing colors?▼

A dark palette is not the light one mechanically reversed. After swapping roles, reduce vividness since colors read as neon on near-black, widen separation at the dark end, and remeasure every contrast pair because contrast is not symmetric across appearances.

When should I fix a failing contrast pair myself?▼

Report the failing pair, its measured value, and the missed threshold, but leave the colors unchanged since they are a design decision. Only change values when asked, adjusting lightness rather than hue, then remeasure to confirm the fix landed.