Swift is a shadcn/ui theme built around a purple primary color (#be37a7) with cyan accents (#37a7be). The light mode uses a neutral background (#fcf8fb). Dark mode keeps the purple primary (#be37a7) on a neutral background (#070307).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf8fbsnow | #070307black |
| Foreground | #000000black | #f9f6f8whitesmoke |
| Card | #faf4f9whitesmoke | #0b040ablack |
| Card foreground | #000000black | #fbf9fasnow |
| Popover | #fcf8fbsnow | #070307black |
| Popover foreground | #000000black | #f9f6f8whitesmoke |
| Primary | #be37a7mediumvioletred | #be37a7mediumvioletred |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #a7be37yellowgreen | #a7be37yellowgreen |
| Secondary foreground | #1c2009black | #1c2009black |
| Muted | #f3f5eblinen | #13140ablack |
| Muted foreground | #4a4b49darkslategray | #b6b6b4silver |
| Accent | #37a7belightseagreen | #37a7belightseagreen |
| Accent foreground | #091c20black | #091c20black |
| Destructive | #9d2c06saddlebrown | #f74f18orangered |
| Destructive foreground | #fee1d8mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #be37a7mediumvioletred | #be37a7mediumvioletred |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.93:1 | AAA |
| Text on card | 19.42:1 | AAA |
| Primary button | 4.89:1 | AA |
| Secondary button | 7.97:1 | AAA |
| Muted text | 7.94:1 | AAA |
| Accent | 6.21:1 | AA |
| Destructive | 6.06:1 | AA |
| Text on background | 19.08:1 | AAA |
| Text on card | 19.30:1 | AAA |
| Primary button | 4.89:1 | AA |
| Secondary button | 7.97:1 | AAA |
| Muted text | 9.12:1 | AAA |
| Accent | 6.21:1 | AA |
| Destructive | 3.45:1 | AA Large |
Paste this into your globals.css to use Swift in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.006 330.909);
--foreground: oklch(0 0 0);
--muted: oklch(0.965 0.013 114.317);
--muted-foreground: oklch(0.411 0.002 114.177);
--popover: oklch(0.983 0.006 330.909);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.974 0.01 330.954);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.575 0.208 335.487);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.759 0.157 118.589);
--secondary-foreground: oklch(0.232 0.038 117.353);
--accent: oklch(0.676 0.103 213.893);
--accent-foreground: oklch(0.212 0.026 212.267);
--destructive: oklch(0.466 0.156 35.967);
--destructive-foreground: oklch(0.931 0.034 39.325);
--ring: oklch(0.575 0.208 335.487);
--chart-1: oklch(0.575 0.208 335.487);
--chart-2: oklch(0.759 0.157 118.589);
--chart-3: oklch(0.676 0.103 213.893);
--chart-4: oklch(0.786 0.16 118.475);
--chart-5: oklch(0.579 0.216 335.689);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.11 0.017 331.59);
--foreground: oklch(0.976 0.004 330.876);
--muted: oklch(0.187 0.019 115.964);
--muted-foreground: oklch(0.775 0.002 114.116);
--popover: oklch(0.11 0.017 331.59);
--popover-foreground: oklch(0.976 0.004 330.876);
--card: oklch(0.126 0.02 331.667);
--card-foreground: oklch(0.984 0.003 330.857);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.575 0.208 335.487);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.759 0.157 118.589);
--secondary-foreground: oklch(0.232 0.038 117.353);
--accent: oklch(0.676 0.103 213.893);
--accent-foreground: oklch(0.212 0.026 212.267);
--destructive: oklch(0.657 0.212 36.503);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.575 0.208 335.487);
--chart-1: oklch(0.575 0.208 335.487);
--chart-2: oklch(0.759 0.157 118.589);
--chart-3: oklch(0.676 0.103 213.893);
--chart-4: oklch(0.786 0.16 118.475);
--chart-5: oklch(0.579 0.216 335.689);
}