Turnstile is a shadcn/ui theme built around a muted violet primary color (#8975a9) with muted purple accents (#a375a9). The light mode uses a neutral background (#f9f6fd). Dark mode keeps the muted violet primary (#8975a9) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f6fdghostwhite | #050307black |
| Foreground | #0b0515black | #ffffffwhite |
| Card | #f6f2fdghostwhite | #07050ablack |
| Card foreground | #090411black | #ffffffwhite |
| Popover | #f9f6fdghostwhite | #050307black |
| Popover foreground | #0b0515black | #ffffffwhite |
| Primary | #8975a9lightslategray | #8975a9lightslategray |
| Primary foreground | #000000black | #000000black |
| Secondary | #757ba9lightslategray | #757ba9lightslategray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e7e7eflavender | #101118black |
| Muted foreground | #585a6fdimgray | #9092a7lightslategray |
| Accent | #a375a9rosybrown | #a375a9rosybrown |
| Accent foreground | #000000black | #000000black |
| Destructive | #d9400dorangered | #d9400dorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8975a9lightslategray | #8975a9lightslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.80:1 | AAA |
| Text on card | 18.36:1 | AAA |
| Primary button | 5.17:1 | AA |
| Secondary button | 4.06:1 | AA Large |
| Muted text | 5.50:1 | AA |
| Accent | 5.66:1 | AA |
| Destructive | 4.48:1 | AA Large |
| Text on background | 20.52:1 | AAA |
| Text on card | 20.29:1 | AAA |
| Primary button | 5.17:1 | AA |
| Secondary button | 4.06:1 | AA Large |
| Muted text | 6.13:1 | AA |
| Accent | 5.66:1 | AA |
| Destructive | 4.48:1 | AA Large |
Paste this into your globals.css to use Turnstile in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.978 0.01 303.493);
--foreground: oklch(0.136 0.037 301.19);
--muted: oklch(0.931 0.01 280.166);
--muted-foreground: oklch(0.474 0.034 279.105);
--popover: oklch(0.978 0.01 303.493);
--popover-foreground: oklch(0.136 0.037 301.19);
--card: oklch(0.968 0.015 303.416);
--card-foreground: oklch(0.125 0.032 302.954);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.6 0.08 301.625);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.596 0.07 278.229);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.626 0.092 322.569);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.591 0.197 35.892);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.6 0.08 301.625);
--chart-1: oklch(0.6 0.08 301.625);
--chart-2: oklch(0.596 0.07 278.229);
--chart-3: oklch(0.626 0.092 322.569);
--chart-4: oklch(0.625 0.064 278.514);
--chart-5: oklch(0.595 0.09 301.322);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.106 0.013 304.186);
--foreground: oklch(1 0 180);
--muted: oklch(0.181 0.015 278.92);
--muted-foreground: oklch(0.666 0.031 279.555);
--popover: oklch(0.106 0.013 304.186);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.122 0.015 304.181);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.6 0.08 301.625);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.596 0.07 278.229);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.626 0.092 322.569);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.591 0.197 35.892);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.6 0.08 301.625);
--chart-1: oklch(0.6 0.08 301.625);
--chart-2: oklch(0.596 0.07 278.229);
--chart-3: oklch(0.626 0.092 322.569);
--chart-4: oklch(0.625 0.064 278.514);
--chart-5: oklch(0.595 0.09 301.322);
}