- Home
- Skills
- UX & UI Design
- Accessible Colour Palette & WCAG Contrast Checker
Works with the AI Agents you already use
Accessible Colour Palette & WCAG Contrast Checker
by Alex
Get a light theme of CSS colour tokens whose WCAG 2.2 contrast is solved and checked, not guessed.
Free
What it does
- Builds a light theme of CSS colour tokens from your brand colours
- Checks an existing stylesheet, such as a shadcn or Tailwind theme, for contrast failures
- Shows a report with the contrast each colour needs and the contrast it gets
- Tells you whether one colour passes on a background, never rounding a near miss up
- Re-checks your tokens file after anyone edits it by hand
Who it's for
Founders and makers with a brand colour
Get a full set of readable colours for your site built around the brand colour you already have.
Try asking: “Make an accessible colour palette for my site from #2563eb.”
Front-end developers using shadcn or Tailwind
Find out which colour pairs in your globals.css fail contrast, with the exact ratio for each.
Try asking: “Check whether the colours in app/globals.css pass WCAG contrast.”
Designers checking accessibility
Get a straight pass or fail for a colour on a background, with the real ratio.
Try asking: “Does #8a8a8a pass as body text on white?”
Freelancers building client sites
Hand over colour tokens with a contrast report that shows every pair holds.
Try asking: “Set up accessible colour tokens for a client site from brand colour #0f766e.”
Accessible Colour Palette & WCAG Contrast Checker
Example session with this skill installed
Make an accessible colour palette for my site from my brand colour #2563eb.
- Read your context and instructions
- Compiled the accessible colour palette
- Generated the UI component
I wrote oklch-solver.json from your brand colour and solved it. Every constraint holds:
light: 34 of 34 constraints hold across 21 tokens
| Token | Tightest against | Needs | Achieved | Solve |
|---|---|---|---|---|
| text-primary | surface-0 | 4.50:1 | 12.00:1 | target 12:1 |
| text-secondary | surface-0 | 4.50:1 | 7.00:1 | target 7:1 |
| text-muted | surface-0 | 4.50:1 | 4.60:1 | target 4.6:1 |
| success-fg | success-bg | 4.50:1 | 4.60:1 | target 4.6:1 |
| warning-fg | warning-bg | 4.50:1 | 4.60:1 | target 4.6:1 |
| danger-fg | danger-bg | 4.50:1 | 4.60:1 | target 4.6:1 |
| info-fg | info-bg | 4.50:1 | 4.60:1 | target 4.6:1 |
| on-accent | accent-app | 4.50:1 | 5.16:1 | fixed |
| accent-app | surface-0 | 4.50:1 | 4.85:1 | kept as given |
| accent-app-on-muted | accent-app-muted | 4.50:1 | 6.35:1 | target 4.6:1 |
| border-strong | surface-0 | 3.00:1 | 3.05:1 | target 3.05:1 |
Wrote
- tokens/tokens.css
Your tokens are in tokens/tokens.css. #2563eb was kept as given for --accent-app. To change a colour, edit oklch-solver.json and solve again rather than editing tokens.css.
tokens.css
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Picking text and button colours that are readable for everyone usually means trial and error with a contrast checker. This skill hands that work to a small command-line tool that does the maths. Your AI agent runs the tool and passes on the report it prints. It never works out a ratio itself.
What you can ask for
- A new palette: give your brand colour and get
tokens/tokens.css, a light theme of text, surface, border, status and accent colours. Every pair is solved to meet WCAG 2.2 contrast, and the tool prints a report as proof. - A check of colours you already have: point it at your
globals.cssortokens.css. It works out which colours are painted on which, grades each pair, and lists any that fail. - A quick answer: ask whether one colour passes on a background. A near miss counts as a fail. It is never rounded up to a pass.
Your brand colour is kept as given wherever it already passes. If it falls short, it moves only as far as it must, and the report tells you.
This is the free version. The paid oklch-solver skill adds dark themes, Tailwind v4 and DTCG output, fixing a single colour, and repairing an existing palette.
Light themes only. It does not make dark themes, output Tailwind v4 or DTCG formats, suggest a passing value for a colour that fails, or repair an existing palette. Those are in the paid oklch-solver skill. The stylesheet check reads one file and does not follow @import.
Runs the pinned CLI @polykinesis/oklch-solver-cli@0.2.0 through npx. npx downloads it from the npm registry on first use. The CLI makes no network requests of its own and reads no environment variables. Needs Node 22.13 or later. Commands: init writes oklch-solver.json from brand colours; solve writes tokens/tokens.css as CSS custom properties in oklch(); audit grades a tokens.css against its config; pairs drafts pairs.json beside an existing stylesheet; check grades that stylesheet's colour pairs; fit reads one colour's ratio on a background. Contrast follows WCAG 2.2: 4.5:1 for text and 3:1 for large text and meaningful non-text, with ratios floored rather than rounded. Exit codes: 0 pass, 1 unmet, 2 invalid input, 3 CLI bug, 4 paid feature.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 days ago
- Free with an Agensi account
- Software
Node.js 22.13+npm (npx)@polykinesis/oklch-solver-clidownloadscommand.
Permissions
Allowed Hosts
File Scopes
npx downloads @polykinesis/oklch-solver-cli@0.2.0 from npm on first use. The CLI itself makes no network requests and reads no environment variables.
What's inside
Creator
Alex
2 skills on Agensi
Frequently Asked Questions
New in UX & UI Design
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for UX & UI Design.