Packs / design-systems-and-ui-kits-public
design-tokens
Turn design tokens into shadcn/Tailwind CSS variables and block colour pairs under WCAG AA contrast
Install
logicpacks pack use design-systems-and-ui-kits-public/design-tokensget_pack design-systems-and-ui-kits-public/design-tokensThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
stdlib - Checks: 2 in
outcome/checks.yaml - Code:
build_tokens.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
Turn design tokens into shadcn/Tailwind CSS variables and block colour pairs under WCAG AA contrast.
Steps
- Keep colours (HSL triplets, light + dark), radius and font in
tokens.json; list the text/background pairs to check. python3 code/build_tokens.py tokens.json globals.csswrites :root/.dark variables with shadcn/ui names plus a Tailwind v4@theme inlineblock.- Any pair under 4.5:1 fails the build.
Edge cases
- Large text (24 px+) may use 3:1; keep body text at 4.5:1.
Don'ts
- Don't hand-edit the generated CSS.
Check
lp pack check design-systems-and-ui-kits/design-tokens runs outcome/checks.yaml.