better-colors

Generate color ramps, semantic tokens, and contrast-checked palettes for CSS projects.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/squidllee/skills --skill better-colors-squidllee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: better-colors
Source: https://github.com/squidllee/skills/tree/main/better-colors
Command: npx skills add https://github.com/squidllee/skills --skill better-colors-squidllee

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 builds and audits a coherent color system so every value has a role, every token has a consistent name, and every contrast claim is measured rather than estimated. ## Core Features & Use Cases - Palette generation: Build perceptually uniform ramps (Tailwind 50–950 or Radix 1–12) from a brand color using libraries like culori, with constant hue, mid-ramp vividness peaks, and denser light-end steps. - Token architecture: Establish a two-tier system of hue-named primitives and role-named semantic tokens (--color-text-secondary, --color-accent-solid) that makes dark mode and theming possible. - Contrast measurement: Measure foreground/background pairs against APCA (Lc) or WCAG 2 thresholds, report failing pairs with measured values, and fix by adjusting lightness on request. - Use Case: Audit an existing stylesheet by collecting every color literal, collapsing near-duplicates, assigning each survivor a role, and reporting findings grouped by principle with severity levels. ## Quick Start Review the color tokens in my stylesheet, generate a complete accent ramp from my brand color #3b82f6, and check the contrast of my text colors against their backgrounds.

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 (Tailwind 500 or Radix 9), then build the ramp outward using perceptual interpolation with a library like culori. Keep hue constant, peak vividness mid-ramp, and space steps evenly in perceived lightness rather than HSL lightness.

What is the difference between primitive and semantic color tokens?▼

Primitives name a value by hue and step, like --blue-500, and are never applied in components. Semantic tokens name a role, like --color-text-secondary, point at a primitive, and are the only tier components reference, which is what makes theming possible.

Should I use APCA or WCAG 2 for contrast checking?▼

APCA is the better default for design decisions because it models perceived contrast more accurately, using Lc thresholds like 75 for body text. WCAG 2 ratios remain required when the project must make a formal WCAG conformance claim.

Does oklch work in all browsers and should I convert my hex colors?▼

oklch is Baseline 2023, so very old browser matrices need a fallback declared first with an @supports override. Match whatever notation the project already uses; convert only when asked or when a migration is explicitly in scope.

Why does my dark mode palette look wrong after reversing the light one?▼

Mechanical reversal is only a starting point. Dark appearances need reduced vividness, wider separation at the dark end, and every contrast pair remeasured, because contrast is not symmetric between light and dark polarities.

How do I fix a text color that fails contrast?▼

Change lightness, the channel contrast responds to, while holding hue and saturation constant, then remeasure. Note that mid-lightness backgrounds cap achievable contrast around Lc 60, so the background itself may need to move toward an extreme.