Swift is a shadcn/ui theme built around an orange primary color (#d3864a) with violet accents (#864ad3). The light mode uses a neutral background (#ffffff). Dark mode keeps the orange primary (#d3864a) on an orange-tinted background (#0c0703).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0c0703black |
| Foreground | #140c06black | #ffffffwhite |
| Card | #fcfcfcsnow | #100904black |
| Card foreground | #100905black | #ffffffwhite |
| Popover | #ffffffwhite | #0c0703black |
| Popover foreground | #140c06black | #ffffffwhite |
| Primary | #d3864aperu | #d3864aperu |
| Primary foreground | #000000black | #000000black |
| Secondary | #4ad386mediumseagreen | #4ad386mediumseagreen |
| Secondary foreground | #104225darkgreen | #104225darkgreen |
| Muted | #e7eeealavender | #111814black |
| Muted foreground | #56675ddimgray | #98a9a0darkgray |
| Accent | #864ad3darkorchid | #864ad3darkorchid |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #9d3110saddlebrown | #eb663dtomato |
| Destructive foreground | #fce9e3mistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d3864aperu | #d3864aperu |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.35:1 | AAA |
| Text on card | 19.32:1 | AAA |
| Primary button | 7.26:1 | AAA |
| Secondary button | 6.00:1 | AA |
| Muted text | 5.10:1 | AA |
| Accent | 5.32:1 | AA |
| Destructive | 6.20:1 | AA |
| Text on background | 20.04:1 | AAA |
| Text on card | 19.72:1 | AAA |
| Primary button | 7.26:1 | AAA |
| Secondary button | 6.00:1 | AA |
| Muted text | 7.32:1 | AAA |
| Accent | 5.32:1 | AA |
| Destructive | 6.47:1 | AA |
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.162 0.019 61.222);
--muted: oklch(0.943 0.009 161.575);
--muted-foreground: oklch(0.496 0.026 160.498);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.162 0.019 61.222);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.149 0.016 64.662);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.688 0.121 56.351);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.774 0.163 154.636);
--secondary-foreground: oklch(0.337 0.072 154.367);
--accent: oklch(0.551 0.201 299.659);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.471 0.149 36.173);
--destructive-foreground: oklch(0.948 0.022 37.647);
--ring: oklch(0.688 0.121 56.351);
--chart-1: oklch(0.688 0.121 56.351);
--chart-2: oklch(0.774 0.163 154.636);
--chart-3: oklch(0.551 0.201 299.659);
--chart-4: oklch(0.787 0.154 155.395);
--chart-5: oklch(0.691 0.127 56.025);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.134 0.015 68.087);
--foreground: oklch(1 0 180);
--muted: oklch(0.2 0.013 160.123);
--muted-foreground: oklch(0.719 0.024 160.996);
--popover: oklch(0.134 0.015 68.087);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.149 0.017 64.875);
--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.688 0.121 56.351);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.774 0.163 154.636);
--secondary-foreground: oklch(0.337 0.072 154.367);
--accent: oklch(0.551 0.201 299.659);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.668 0.174 37.358);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.688 0.121 56.351);
--chart-1: oklch(0.688 0.121 56.351);
--chart-2: oklch(0.774 0.163 154.636);
--chart-3: oklch(0.551 0.201 299.659);
--chart-4: oklch(0.787 0.154 155.395);
--chart-5: oklch(0.691 0.127 56.025);
}