What problem does it solve?
Web projects often accumulate inconsistent color values, failing contrast pairs, hue-drifting HSL palettes, and out-of-gamut colors that clip on real displays. This Skill provides a systematic OKLCH-based workflow for converting colors, generating perceptually uniform palettes, verifying accessibility contrast, and theming with Tailwind v4.
Core Features & Use Cases
- Color Conversion: Convert hex, rgb(), and hsl() values to oklch() with consistent formatting, preserving keywords, gradients, and existing token systems.
- Palette Generation: Build 5, 9, or 11-step numeric scales with per-step gamut clamping, multi-hue palettes using equal chroma percentages, and tuned dark mode variants.
- Contrast & Accessibility: Measure foreground/background pairs against APCA (Lc 75/90) and WCAG 2 (4.5:1/7:1) thresholds, report failures, and fix lightness on request.
- Gamut & Tailwind v4: Clamp out-of-gamut chroma, add Display P3 fallbacks with @media (color-gamut: p3), and define custom @theme color scales in oklch.
- Use Case: When migrating a stylesheet to Tailwind v4, convert all hex tokens in the @theme block to oklch, generate a brand-50 through brand-950 scale, and verify every text/background pair in both light and dark appearances.
Quick Start
Convert the hex colors in my theme.css to oklch and check the contrast of my primary button against its background.