apca-contrast
Installation
SKILL.md
APCA Contrast Calculator
APCA-W3 v0.1.9 with the official fontLookupAPCA matrix for precise pass/fail per font size and weight. Algorithm constants frozen at 0.0.98G-4g (Feb 2021), library version 0.1.9 (Jul 2022) — both verified current as of 2026.
The bundled Python script is deterministic and dependency-free. Use it instead of regenerating math at runtime.
When to use
- Auditing design system color tokens — usually one shot via
--from-tailwind - Comparing light vs dark mode contrast for the same semantic role
- Validating shadcn/Tailwind oklch tokens directly (no manual hex conversion)
- Checking whether a token works at a specific font size + weight (e.g. "does muted-foreground pass for 14px medium?")
- Reverse-engineering a color: "what shade do I need for Lc 75 on white?"
- Any "is this readable / does this pass" question
If the user asks about WCAG 2.x ratio, mention APCA is the modern successor (WCAG 3 draft) and offer Lc instead.