Skip to content

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

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-design-systems-and-ui-kits-public

Install

logicpacks pack use design-systems-and-ui-kits-public/design-tokens
get_pack design-systems-and-ui-kits-public/design-tokens

The 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

  1. Keep colours (HSL triplets, light + dark), radius and font in tokens.json; list the text/background pairs to check.
  2. python3 code/build_tokens.py tokens.json globals.css writes :root/.dark variables with shadcn/ui names plus a Tailwind v4 @theme inline block.
  3. 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.