Swift for shadcn/ui

Swift is a shadcn/ui theme built around a green primary color (#6ee65c) with green accents (#5ce68e). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#6ee65c) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefbwhite
#000000black
Foreground
#040d03black
#fcfdfcwhite
Card
#fbfefbwhite
#000000black
Card foreground
#040d03black
#fcfdfcwhite
Popover
#fbfefbwhite
#000000black
Popover foreground
#040d03black
#fcfdfcwhite
Primary
#6ee65clightgreen
#6ee65clightgreen
Primary foreground
#040d02black
#040d02black
Secondary
#b3e65cdarkkhaki
#b3e65cdarkkhaki
Secondary foreground
#090d02black
#090d02black
Muted
#e7ebe0beige
#1b1f14black
Muted foreground
#5b6052dimgray
#a8ad9fdarkgray
Accent
#5ce68emediumaquamarine
#5ce68emediumaquamarine
Accent foreground
#020d06black
#020d06black
Destructive
#db3e00orangered
#ff5e1forangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6ee65clightgreen
#6ee65clightgreen

Contrast

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

Light mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button12.30:1AAA
Secondary button13.39:1AAA
Muted text5.34:1AA
Accent12.33:1AAA
Destructive4.45:1AA Large
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button12.30:1AAA
Secondary button13.39:1AAA
Muted text7.32:1AAA
Accent12.33:1AAA
Destructive6.87:1AA

CSS variables

Paste this into your globals.css to use Swift in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 141.578);
  --foreground: oklch(0.143 0.031 139.594);
  --muted: oklch(0.933 0.014 123.161);
  --muted-foreground: oklch(0.481 0.023 123.676);
  --popover: oklch(0.994 0.005 141.578);
  --popover-foreground: oklch(0.143 0.031 139.594);
  --card: oklch(0.994 0.005 141.578);
  --card-foreground: oklch(0.143 0.031 139.594);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.826 0.208 141.093);
  --primary-foreground: oklch(0.144 0.034 139.426);
  --secondary: oklch(0.861 0.174 126.781);
  --secondary-foreground: oklch(0.151 0.028 122.874);
  --accent: oklch(0.827 0.172 152.659);
  --accent-foreground: oklch(0.144 0.026 157.953);
  --destructive: oklch(0.593 0.202 36.323);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.826 0.208 141.093);
  --chart-1: oklch(0.826 0.208 141.093);
  --chart-2: oklch(0.861 0.174 126.781);
  --chart-3: oklch(0.827 0.172 152.659);
  --chart-4: oklch(0.871 0.163 126.348);
  --chart-5: oklch(0.831 0.214 141.101);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 141.59);
  --muted: oklch(0.23 0.02 124.284);
  --muted-foreground: oklch(0.739 0.021 123.364);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 141.59);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.001 141.59);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.826 0.208 141.093);
  --primary-foreground: oklch(0.144 0.034 139.426);
  --secondary: oklch(0.861 0.174 126.781);
  --secondary-foreground: oklch(0.151 0.028 122.874);
  --accent: oklch(0.827 0.172 152.659);
  --accent-foreground: oklch(0.144 0.026 157.953);
  --destructive: oklch(0.687 0.207 38.888);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.826 0.208 141.093);
  --chart-1: oklch(0.826 0.208 141.093);
  --chart-2: oklch(0.861 0.174 126.781);
  --chart-3: oklch(0.827 0.172 152.659);
  --chart-4: oklch(0.871 0.163 126.348);
  --chart-5: oklch(0.831 0.214 141.101);
}