Swift is a shadcn/ui theme built around a muted violet primary color (#8c83a0) with muted green accents (#97a083). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#8c83a0) on a violet-tinted background (#08050f).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #08050fblack |
| Foreground | #000000black | #f7f7f8whitesmoke |
| Card | #fcfcfcsnow | #0a0613black |
| Card foreground | #000000black | #faf9fasnow |
| Popover | #fcfcfcsnow | #0a0613black |
| Popover foreground | #000000black | #faf9fasnow |
| Primary | #8c83a0lightslategray | #8c83a0lightslategray |
| Primary foreground | #000000black | #000000black |
| Secondary | #97a083darkseagreen | #97a083darkseagreen |
| Secondary foreground | #000000black | #000000black |
| Muted | #e9eeddbeige | #1d2211black |
| Muted foreground | #494d42darkslategray | #babdb2silver |
| Accent | #97a083darkseagreen | #97a083darkseagreen |
| Accent foreground | #000000black | #000000black |
| Destructive | #980906darkred | #f6302ccrimson |
| Destructive foreground | #fdd4d3mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8c83a0lightslategray | #8c83a0lightslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 5.87:1 | AA |
| Secondary button | 7.63:1 | AAA |
| Muted text | 7.33:1 | AAA |
| Accent | 7.63:1 | AAA |
| Destructive | 6.55:1 | AA |
| Text on background | 18.86:1 | AAA |
| Text on card | 19.04:1 | AAA |
| Primary button | 5.87:1 | AA |
| Secondary button | 7.63:1 | AAA |
| Muted text | 8.51:1 | AAA |
| Accent | 7.63:1 | AAA |
| Destructive | 3.90:1 | AA Large |
Paste this into your globals.css to use Swift in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.941 0.024 121.196);
--muted-foreground: oklch(0.414 0.019 121.535);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--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.628 0.043 299.62);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.689 0.042 121.781);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.689 0.042 121.781);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.43 0.171 28.985);
--destructive-foreground: oklch(0.904 0.047 19.199);
--ring: oklch(0.628 0.043 299.62);
--chart-1: oklch(0.628 0.043 299.62);
--chart-2: oklch(0.689 0.042 121.781);
--chart-3: oklch(0.689 0.042 121.781);
--chart-4: oklch(0.712 0.039 121.672);
--chart-5: oklch(0.622 0.054 299.331);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.128 0.026 299.834);
--foreground: oklch(0.976 0.002 300.733);
--muted: oklch(0.242 0.033 123.162);
--muted-foreground: oklch(0.793 0.016 121.108);
--popover: oklch(0.139 0.03 298.276);
--popover-foreground: oklch(0.984 0.001 300.744);
--card: oklch(0.139 0.03 298.276);
--card-foreground: oklch(0.984 0.001 300.744);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.628 0.043 299.62);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.689 0.042 121.781);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.689 0.042 121.781);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.631 0.232 27.695);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.628 0.043 299.62);
--chart-1: oklch(0.628 0.043 299.62);
--chart-2: oklch(0.689 0.042 121.781);
--chart-3: oklch(0.689 0.042 121.781);
--chart-4: oklch(0.712 0.039 121.672);
--chart-5: oklch(0.622 0.054 299.331);
}