Swift is a shadcn/ui theme built around a neutral gray primary color (#d9d8d9) with neutral gray accents (#d8d9d9). The light mode uses a neutral background (#fefbfc). Dark mode keeps the neutral gray primary (#d9d8d9) on a pink-tinted background (#0c0307).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfcsnow | #0c0307black |
| Foreground | #0d0207black | #fcf8fasnow |
| Card | #fefbfcsnow | #0c0307black |
| Card foreground | #0d0207black | #fcf8fasnow |
| Popover | #fefbfcsnow | #0c0307black |
| Popover foreground | #0d0207black | #fcf8fasnow |
| Primary | #d9d8d9gainsboro | #d9d8d9gainsboro |
| Primary foreground | #403f40darkslategray | #403f40darkslategray |
| Secondary | #d9d9d8gainsboro | #d9d9d8gainsboro |
| Secondary foreground | #40403fdarkslategray | #40403fdarkslategray |
| Muted | #dae5d2gainsboro | #222d1ablack |
| Muted foreground | #454644darkslategray | #babbb9silver |
| Accent | #d8d9d9gainsboro | #d8d9d9gainsboro |
| Accent foreground | #3f4040darkslategray | #3f4040darkslategray |
| Destructive | #5e2008maroon | #dd4c13chocolate |
| Destructive foreground | #f7b9a1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d9d8d9gainsboro | #d9d8d9gainsboro |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.85:1 | AAA |
| Text on card | 19.85:1 | AAA |
| Primary button | 7.39:1 | AAA |
| Secondary button | 7.35:1 | AAA |
| Muted text | 7.28:1 | AAA |
| Accent | 7.34:1 | AAA |
| Destructive | 7.34:1 | AAA |
| Text on background | 19.31:1 | AAA |
| Text on card | 19.31:1 | AAA |
| Primary button | 7.39:1 | AAA |
| Secondary button | 7.35:1 | AAA |
| Muted text | 7.43:1 | AAA |
| Accent | 7.34:1 | AAA |
| Destructive | 4.11:1 | AA Large |
Paste this into your globals.css to use Swift in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 348.821);
--foreground: oklch(0.118 0.031 348.881);
--muted: oklch(0.908 0.028 131.361);
--muted-foreground: oklch(0.391 0.003 131.141);
--popover: oklch(0.991 0.003 348.821);
--popover-foreground: oklch(0.118 0.031 348.881);
--card: oklch(0.991 0.003 348.821);
--card-foreground: oklch(0.118 0.031 348.881);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.884 0.001 348.763);
--primary-foreground: oklch(0.37 0.002 348.881);
--secondary: oklch(0.885 0.001 131.096);
--secondary-foreground: oklch(0.372 0.002 131.14);
--accent: oklch(0.884 0.001 254.958);
--accent-foreground: oklch(0.37 0.001 254.975);
--destructive: oklch(0.336 0.096 39.714);
--destructive-foreground: oklch(0.837 0.079 42.541);
--ring: oklch(0.884 0.001 348.763);
--chart-1: oklch(0.884 0.001 348.763);
--chart-2: oklch(0.885 0.001 131.096);
--chart-3: oklch(0.884 0.001 254.958);
--chart-4: oklch(0.908 0.001 131.093);
--chart-5: oklch(0.883 0.004 348.853);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.024 348.702);
--foreground: oklch(0.983 0.004 348.848);
--muted: oklch(0.282 0.037 132.375);
--muted-foreground: oklch(0.791 0.002 131.108);
--popover: oklch(0.121 0.024 348.702);
--popover-foreground: oklch(0.983 0.004 348.848);
--card: oklch(0.121 0.024 348.702);
--card-foreground: oklch(0.983 0.004 348.848);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.884 0.001 348.763);
--primary-foreground: oklch(0.37 0.002 348.881);
--secondary: oklch(0.885 0.001 131.096);
--secondary-foreground: oklch(0.372 0.002 131.14);
--accent: oklch(0.884 0.001 254.958);
--accent-foreground: oklch(0.37 0.001 254.975);
--destructive: oklch(0.611 0.19 38.338);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.884 0.001 348.763);
--chart-1: oklch(0.884 0.001 348.763);
--chart-2: oklch(0.885 0.001 131.096);
--chart-3: oklch(0.884 0.001 254.958);
--chart-4: oklch(0.908 0.001 131.093);
--chart-5: oklch(0.883 0.004 348.853);
}