better-colors
Skill1 starsChanged 4 months agoMITView on GitHub
OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.
16 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- shayan-m81/layerwrighttheir own version, first seen Oct 5, 2026
- compozy/compozytheir own version, first seen Oct 1, 2026
- 0xPasho/agentcuttheir own version, first seen Sep 21, 2026
- transitive-bullshit/skillstheir own version, first seen Sep 19, 2026
- SkotAlexsander/skillsword for word, first seen Sep 16, 2026
- stritar/skillstheir own version, first seen Sep 11, 2026
Used with
Projects with it also use improve-ui, create-design-md and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
QredenceSkillimprove-ui
Audit one selected Figma Design surface or Figma Make prototype against visible design evidence, connected libraries, local styles, variables, components, sibling screens, and user task goals, then return up to three supported UI improvement findings with clear evidence and proposed changes. Do not use for design-system conformance audits (follow-ds-guidelines), Nielsen-heuristic evaluations (heuristic-evaluation), or cross-screen consistency checks (visual-consistency-check).
Also in 3 projects that use this
sjyookSkillcreate-design-md
브랜드·제품의 디자인 시스템을 정의하는 DESIGN.md를 생성. 트리거 조건: "DESIGN.md 만들어", "디자인 시스템 정의", "디자인 토큰", "컬러 팔레트 잡아줘", "타이포그래피 정의", "brand guidelines", "design tokens", "make a design system". NOT for: 기존 CSS·Tailwind 파일 직접 수정, 단순 색상 추천 (DESIGN.md 없이), README 작성, 코드 컴포넌트 리팩터링.
Also in 3 projects that use this
VercelSkillemil-design-eng
This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.
Also in 5 projects that use this
arkanSkillreview-animations
Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.
Also in 4 projects that use this
sanmidableSkillfind-animation-opportunities
Also in 3 projects that use this
xerocSkillimprove-animations
Survey a codebase's animation and motion code as a senior motion advisor, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the animations", "audit the motion", "make this app feel better", or wants a roadmap of animation fixes rather than a review of a single diff.
Also in 3 projects that use this
Other versions16 projects use a version of this.
Word for word · 2
- julianromli/faiz-skills★ 16100% same
- SkotAlexsander/skills★ 1100% same
Edited · 2
- xeroc/skills★ 150% same
- elpiarthera/vantage-starter★ 054% same
Wrote their own version · 12
- jakubkrehel/skills★ 7.5ksame name
- compozy/compozy★ 2.8ksame name
- boraoztunc/skills★ 388same name
- Dimon94/skills★ 107same name
- 0xPasho/agentcut★ 9same name
- transitive-bullshit/skills★ 3same name
- sanmidable/skills★ 2same name
- AnasX7/skills★ 1same name
- arkan/skills★ 1same name
- ElyzeSolutions/skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- better-accessibilitySkill
- better-interfaceSkill
- better-layoutSkill
- better-operational-interfaceSkill
- better-typographySkill
- better-uiSkill
- better-writingSkill
- bof-operational-uiSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Respect the existing system: Do not convert notation merely because this skill was loaded.
- Distinctive: line 28
Finite gamut: Not every oklch value maps to a displayable sRGB color.
- Very specific: line 85
Use this format only when the user asks for a standalone color review.
- Very specific: line 113
When there are no findings, omit the table, state "No actionable color findings", report verification, and end with Approve.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OKLCH Colors
OKLCH is a perceptually uniform color space where lightness, chroma, and hue are useful design controls. Use it when the project already uses OKLCH, when creating a new color system, or when the user asks for conversion or palette work. Otherwise preserve the project's established tokens and notation: a consistent hex or RGB token system is better than introducing a second color representation for an isolated fix. To explore interactively, visit oklch.fyi.
Quick Reference
| Category | When to use | Reference |
| Conversion | Hex/rgb/hsl to oklch | color-conversion.md |
| Palettes | Generate scales, multi-hue, dark mode | palette-generation.md |
| Contrast | APCA/WCAG checks, reporting failures, fixing on request | accessibility-contrast.md |
| Gamut & Tailwind | P3 fallbacks, @theme scales, gamut clamping | gamut-and-tailwind.md |
| Usage | Semantic tokens, one meaning per color, primary-action emphasis, appearance variants | color-usage.md |
Core Principles
1. Use a Perceptual Color Space
- Respect the existing system. Do not convert notation merely because this skill was loaded. Reuse the project's semantic tokens and authoring format unless the task includes a color-system migration.
- Perceptual uniformity. Equal L steps = equal brightness.
oklch(0.5 ...)is visually mid. HSL'slightness: 50%varies wildly by hue. - Stable hue. HSL blue shifts toward purple as lightness changes. OKLCH hue stays constant across the full lightness range.
- Independent chroma. Chroma is an absolute measure of colorfulness that doesn't depend on lightness. HSL saturation does.
- Finite gamut. Not every oklch value maps to a displayable sRGB color. High-chroma values at certain hues will clip; gamut awareness is required.
2. Write and Format OKLCH Consistently
oklch(L C H)
oklch(L C H / alpha)| Channel | Range | Description |
| L (Lightness) | 0–1 | 0 = black, 1 = white. Perceptually uniform. |
| C (Chroma) | 0–~0.4 | Colorfulness. 0 = gray. Max depends on L and H. |
| H (Hue) | 0–360 | Hue angle in degrees. |
| alpha | 0–1 | Optional transparency. Slash syntax. |
oklch(0.637 0.237 25.331)
oklch(0.8 0.05 200 / 0.5)Use three decimal places for L and C and up to three for H. Drop trailing zeros and format -0 as 0. OKLCH is Baseline 2023; when support requirements are unusually broad, check the target project's browser matrix instead of relying on a fixed global-coverage percentage.
3. Measure Contrast, Gamut, and Palette Behavior
| Rule | Value |
| Light/dark boundary | L > 0.73 = light background → dark text; below it, light text still scores higher |
| Lightness gap (light bg) | Foreground L < 0.35 when background L > 0.9 |
| Lightness gap (dark bg) | Foreground L > 0.9 when background L < 0.25 |
| Hue drift threshold | > 10° spread across palette steps = visible drift |
| APCA body text | |Lc| >= 75 minimum, >= 90 preferred |
| APCA non-body text | |Lc| >= 60 minimum |
| WCAG 2 normal text | 4.5:1 AA, 7:1 AAA |
| Contrast fix (only when asked) | Adjust L first; preserve C and H when possible, then remeasure the rendered pair |
Common Mistakes
| Issue | Fix |
| Raw color bypasses the project's semantic token system | Reuse or add the correct role token in the project's existing notation |
| Isolated OKLCH value introduced into a hex/RGB codebase | Preserve the established notation unless the task includes a color-system migration |
| HSL palette ramp with hue drift | Rebuild with constant oklch hue |
| Failing contrast (check foreground vs its background using APCA) | Report the pair, its measured Lc and the threshold it misses; change colors only when asked (then adjust L, keep C and H) |
| High chroma without gamut check | Clamp to max chroma for the L/H in sRGB |
| Same absolute C across different hues | Use same C% (percentage of max) for consistent vividness |
| P3 color without sRGB fallback | Add @media (color-gamut: p3) pattern |
| Dark mode created by mechanically reversing the light palette | Use the light palette as a starting point, then tune chroma and lightness and recheck every foreground/background pair |
Hex in Tailwind v4 @theme | Convert to oklch values |
| Alpha with comma syntax | Use slash: oklch(L C H / alpha) |
| Same hue means two different things (link color reused decoratively) | One color, one meaning; give the second use a neutral |
| Semantic token used outside its role (separator as text) | Add a token for the missing role; never borrow by value |
| Several colored control backgrounds in one view | Fill only the single primary action; secondaries stay neutral |
| Palette verified only in light mode | Recheck every foreground/background pair in both appearances |
Review Output Format
Use this format only when the user asks for a standalone color review. When better-interface orchestrates the review, provide domain evidence and findings to that skill and let its output format, severity scale, consolidation rules, cap, and verdict take precedence.
Present the standalone review in two parts.
Findings
Group all confirmed findings by principle. Use a markdown table with Severity, Location, Before, After, and Why columns. Never use separate "Before:" / "After:" lines.
- Severity:
HIGHmakes content unreadable or assigns a misleading semantic color;MEDIUMcreates a noticeable theme, gamut, or consistency failure;LOWis isolated polish. - Location: cite
path/to/file:line. If the artifact has no source files, cite the exact screen and component instead. - Before / After: show the current value or token and the exact replacement.
- Why: name the violated principle and include measured contrast or gamut evidence when relevant.
Consolidate a repeated systemic issue into one row and list every affected location. Omit principles with no findings.
| Severity | Location | Before | After | Why |
| MEDIUM | src/theme.css:18 | color: #3b82f6 | color: oklch(0.623 0.188 259.815) | New project colors use OKLCH tokens |
| MEDIUM | src/palette.ts:31 | Same absolute C across hues | Same C% of each hue's maximum chroma | Equal chroma values do not appear equally vivid across hues |
| HIGH | src/theme.css:52 | P3 color with no fallback | Add an sRGB fallback before @media (color-gamut: p3) | The color fails on non-P3 displays |
Verification and Verdict
After the findings:
- Verification: list the exact checks run and their observed results, including contrast measurements, gamut checks, and both light and dark appearances when applicable. If a check was not run, state what still needs verification.
- Verdict:
Blockif anyHIGHfinding remains,Needs changesif onlyMEDIUMorLOWfindings remain, andApproveonly when no actionable findings remain.
When there are no findings, omit the table, state "No actionable color findings", report verification, and end with Approve.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

