INTEGRATION

shadcn theme generator with accessibility

shadcn's convention pairs every background token with a matching foreground token, --primary and --primary-foreground, for example, but nothing in the framework checks that the pairing stays readable. Paletta generates the full paired token set from one seed color and validates every foreground/background pair against WCAG 2.2 before export.

Updated 2026-07-15

How it works

  1. 1

    Pick a seed color

    Choose the color that becomes the shadcn --primary token.

  2. 2

    Generate paired tokens

    Paletta computes matching foreground tokens, --primary-foreground, --card-foreground, and the rest, for every background token.

  3. 3

    Validate every pair

    Each foreground/background combination is checked against WCAG 2.2 and flagged if it drops below AA.

  4. 4

    Export the CSS block

    Copy a :root and .dark block ready for globals.css, validated separately for light and dark mode.

EXPORT

shadcn CSS variables

Copy and paste directly into your project.

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --primary: oklch(0.546 0.215 262.9);
  --primary-foreground: oklch(0.985 0 0);
  --border: oklch(0.922 0 0);
}

Frequently asked questions

Related integrations

Try it on your own colors

Generate a validated palette, then export it in the format above.

Generate an accessible shadcn theme