Swift for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.35:1AAA
Text on card19.32:1AAA
Primary button7.26:1AAA
Secondary button6.00:1AA
Muted text5.10:1AA
Accent5.32:1AA
Destructive6.20:1AA
Dark mode
Text on background20.04:1AAA
Text on card19.72:1AAA
Primary button7.26:1AAA
Secondary button6.00:1AA
Muted text7.32:1AAA
Accent5.32:1AA
Destructive6.47:1AA

CSS variables

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);
}